Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for peekTrailers (0.04 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt

        assertThat(response.trailers()).isEqualTo(headersOf("t1", "v1"))
      }
    
      @Test
      fun peekTrailersHttp1() {
        peekTrailers(Protocol.HTTP_1_1)
      }
    
      @Test
      fun peekTrailersHttp2() {
        peekTrailers(Protocol.HTTP_2)
      }
    
      private fun peekTrailers(protocol: Protocol) {
        val responseBody = "a".repeat(OKHTTP_CLIENT_WINDOW_SIZE)
        enableProtocol(protocol)
    
        server.enqueue(
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 08 21:45:04 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/Exchange.kt

        } catch (e: IOException) {
          call.eventListener.responseFailed(call, e)
          trackFailure(e)
          throw e
        }
      }
    
      @Throws(IOException::class)
      fun peekTrailers(): Headers? = codec.peekTrailers()
    
      fun upgradeToSocket(): Socket {
        call.upgradeToSocket()
        (codec.carrier as RealConnection).useAsSocket()
    
        return object : Socket {
          override fun cancel() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

                response
                  .newBuilder()
                  .body(responseBody)
                  .trailers(
                    object : TrailersSource {
                      override fun peek() = exchange.peekTrailers()
    
                      override fun get(): Headers {
                        val source = responseBody.source()
                        if (source.isOpen) {
                          source.skipAll()
                        }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Oct 30 13:46:58 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  4. CHANGELOG.md

        interruptions well. This is now fixed.
    
     *  Upgrade: [Kotlin 2.2.20][kotlin_2_2_20].
     *  Upgrade: [Okio 3.16.0][okio_3_16_0].
    
    
    ## Version 5.1.0
    
    _2025-07-07_
    
     *  New: `Response.peekTrailers()`. When we changed `Response.trailers()` to block instead of
        throwing in 5.0.0, we inadvertently removed the ability for callers to peek the trailers
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 05 16:02:59 UTC 2025
    - 36.2K bytes
    - Viewed (2)
  5. okhttp/api/jvm/okhttp.api

    	public final fun networkResponse ()Lokhttp3/Response;
    	public final fun newBuilder ()Lokhttp3/Response$Builder;
    	public final fun peekBody (J)Lokhttp3/ResponseBody;
    	public final fun peekTrailers ()Lokhttp3/Headers;
    	public final fun priorResponse ()Lokhttp3/Response;
    	public final fun protocol ()Lokhttp3/Protocol;
    	public final fun receivedResponseAtMillis ()J
    	public final fun request ()Lokhttp3/Request;
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.2K bytes
    - Viewed (0)
  6. okhttp/api/android/okhttp.api

    	public final fun networkResponse ()Lokhttp3/Response;
    	public final fun newBuilder ()Lokhttp3/Response$Builder;
    	public final fun peekBody (J)Lokhttp3/ResponseBody;
    	public final fun peekTrailers ()Lokhttp3/Headers;
    	public final fun priorResponse ()Lokhttp3/Response;
    	public final fun protocol ()Lokhttp3/Protocol;
    	public final fun receivedResponseAtMillis ()J
    	public final fun request ()Lokhttp3/Request;
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.3K bytes
    - Viewed (0)
Back to top