Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for removeHeader (0.29 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/CompressionInterceptor.kt

        val algorithm = lookupDecompressor(encoding) ?: return response
    
        val decompressedSource = algorithm.decompress(body.source()).buffer()
    
        return response
          .newBuilder()
          .removeHeader("Content-Encoding")
          .removeHeader("Content-Length")
          .body(decompressedSource.asResponseBody(body.contentType(), -1))
          .build()
      }
    
      internal fun lookupDecompressor(encoding: String): DecompressionAlgorithm? =
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 15:15:28 UTC 2025
    - 2.9K bytes
    - Viewed (1)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt

        open fun addHeader(
          name: String,
          value: String,
        ) = apply {
          headers.add(name, value)
        }
    
        /** Removes all headers named [name] on this builder. */
        open fun removeHeader(name: String) =
          apply {
            headers.removeAll(name)
          }
    
        /** Removes all headers on this builder and adds [headers]. */
        open fun headers(headers: Headers) =
          apply {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Oct 30 13:46:58 UTC 2025
    - 14.7K bytes
    - Viewed (1)
  3. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        mockResponse = mockResponse.addHeaderLenient("", Any())
        mockResponse = mockResponse.setHeader("", Any())
        mockResponse.headers = headersOf()
        mockResponse.trailers = headersOf()
        mockResponse = mockResponse.removeHeader("")
        var body: Buffer? = mockResponse.getBody()
        mockResponse = mockResponse.setBody(Buffer())
        mockResponse = mockResponse.setChunkedBody(Buffer(), 0)
        mockResponse = mockResponse.setChunkedBody("", 0)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 47K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt

        }
      }
    
      @Test
      fun readEmptyTrailersHttp1UnknownLengthResponse() {
        server.enqueue(
          MockResponse
            .Builder()
            .body("Hello")
            .removeHeader("Content-Length")
            .onResponseEnd(ShutdownConnection)
            .build(),
        )
    
        val call = client.newCall(Request(server.url("/")))
        call.execute().use { response ->
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 08 21:45:04 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

        open fun addHeader(
          name: String,
          value: String,
        ) = apply {
          headers.add(name, value)
        }
    
        /** Removes all headers named [name] on this builder. */
        open fun removeHeader(name: String) =
          apply {
            headers.removeAll(name)
          }
    
        /** Removes all headers on this builder and adds [headers]. */
        open fun headers(headers: Headers) =
          apply {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt

          object : Dispatcher() {
            override fun dispatch(request: RecordedRequest): MockResponse =
              upgradeResponse(request)
                .body(Buffer().write("81".decodeHex())) // Truncated frame.
                .removeHeader("Content-Length")
                .build()
          }
        val webSocket: WebSocket = newWebSocket()
        clientListener.assertOpen()
        clientListener.assertFailure(
          SocketTimeoutException::class.java,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  7. okhttp/api/jvm/okhttp.api

    	public fun post (Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
    	public fun put (Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
    	public fun query (Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
    	public fun removeHeader (Ljava/lang/String;)Lokhttp3/Request$Builder;
    	public fun tag (Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;
    	public fun tag (Ljava/lang/Object;)Lokhttp3/Request$Builder;
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.2K bytes
    - Viewed (0)
  8. okhttp/api/android/okhttp.api

    	public fun post (Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
    	public fun put (Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
    	public fun query (Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
    	public fun removeHeader (Ljava/lang/String;)Lokhttp3/Request$Builder;
    	public fun tag (Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;
    	public fun tag (Ljava/lang/Object;)Lokhttp3/Request$Builder;
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.3K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

      }
    
      @Test
      fun get204Response() {
        val responseWithoutBody =
          MockResponse
            .Builder()
            .status("HTTP/1.1 204")
            .removeHeader("Content-Length")
            .build()
        server.enqueue(responseWithoutBody)
        val call = client.newCall(Request(server.url("/foo")))
        val response = call.execute()
    
        // Body contains nothing.
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 01 12:18:11 UTC 2025
    - 67.4K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

            response: MockResponse.Builder,
            content: Buffer,
            chunkSize: Int,
          ) {
            response.body(content)
            response.onResponseEnd(ShutdownConnection)
            response.removeHeader("Content-Length")
          }
        }, ;
    
        abstract fun setBody(
          response: MockResponse.Builder,
          content: Buffer,
          chunkSize: Int,
        )
    
        fun setBody(
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 17:41:45 UTC 2025
    - 116.8K bytes
    - Viewed (0)
Back to top