Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 64 of 64 for getHeader (0.04 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

      }
    
      @ParameterizedTest
      @ArgumentsSource(ProtocolParamProvider::class)
      fun head(protocol: Protocol) {
        setUp(protocol)
        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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/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("/"))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 113.6K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun contentDisagreesWithContentLengthHeaderBodyTooShort() {
        server.enqueue(
          MockResponse
            .Builder()
            .body("abc")
            .setHeader("Content-Length", "5")
            .onResponseEnd(ShutdownConnection)
            .build(),
        )
        assertFailsWith<ProtocolException> {
          val response = getResponse(newRequest("/"))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

       */
      @Test
      fun proxyUpgradeFailsWithTruncatedResponse() {
        server.enqueue(
          MockResponse
            .Builder()
            .body("abc")
            .setHeader("Content-Length", "5")
            .onResponseEnd(ShutdownConnection)
            .build(),
        )
        val hostnameVerifier = RecordingHostnameVerifier()
        client =
          client
            .newBuilder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
Back to top