- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for peekTrailers (0.06 seconds)
-
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(Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 18.8K bytes - Click Count (0) -
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() {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 10.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
newFixedLengthSource(response.request.url, contentLength) } else { newUnknownLengthSource(response.request.url) } } } override fun peekTrailers(): Headers? { if (trailers === TRAILERS_RESPONSE_BODY_TRUNCATED) { throw IOException("Trailers cannot be read because the response body was truncated") }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 17.6K bytes - Click Count (7) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jul 28 14:39:28 GMT 2025 - 18.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Stream.kt
} throw errorException ?: StreamResetException(errorCode!!) } } /** * Returns the trailers if they're immediately available. */ @Throws(IOException::class) fun peekTrailers(): Headers? { withLock { if (source.finished && source.receiveBuffer.exhausted() && source.readBuffer.exhausted()) { return source.trailers ?: Headers.EMPTY } if (errorCode != null) {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jul 07 18:57:05 GMT 2025 - 22.4K bytes - Click Count (0) -
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
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 15 11:57:47 GMT 2026 - 36.2K bytes - Click Count (2)