Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 54 of 54 for setReader (0.16 sec)

  1. okhttp/src/test/java/okhttp3/CacheTest.kt

          // because of the retry. We just want to ensure the initial 408 isn't cached.
          expectedResponseCode = 200
          server.enqueue(
            MockResponse.Builder()
              .setHeader("Cache-Control", "no-store")
              .body("FGHIJ")
              .build(),
          )
        }
        server.start()
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

      fun head(
        protocol: Protocol,
        mockWebServer: MockWebServer,
      ) {
        setUp(protocol, mockWebServer)
        val mockResponse =
          MockResponse.Builder()
            .setHeader("Content-Length", 5)
            .status("HTTP/1.1 200")
            .build()
        server.enqueue(mockResponse)
        val call =
          client.newCall(
            Request.Builder()
              .head()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun contentDisagreesWithContentLengthHeaderBodyTooShort() {
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .setHeader("Content-Length", "5")
            .socketPolicy(DisconnectAtEnd)
            .build(),
        )
        assertFailsWith<ProtocolException> {
          val response = getResponse(newRequest("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CallTest.kt

       * https://github.com/square/okhttp/issues/5727
       */
      @Test
      fun proxyUpgradeFailsWithTruncatedResponse() {
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .setHeader("Content-Length", "5")
            .socketPolicy(DisconnectAtEnd)
            .build(),
        )
        val hostnameVerifier = RecordingHostnameVerifier()
        client =
          client.newBuilder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top