- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 51 for trailers (0.09 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/ResponseJvmTest.kt
assertThat(response.trailers()).isEmpty() } @Test fun worksIfTrailersSet() { val response = newResponse("".toResponseBody()) { trailers( object : TrailersSource { override fun get() = Headers.headersOf("a", "b") }, ) } assertThat(response.trailers()["a"]).isEqualTo("b") }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 2.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Stream.kt
if (flushHeaders) { connection.flush() } } fun enqueueTrailers(trailers: Headers) { withLock { check(!sink.finished) { "already finished" } require(trailers.size != 0) { "trailers.size() == 0" } this.sink.trailers = trailers } } fun readTimeout(): Timeout = readTimeout fun writeTimeout(): Timeout = writeTimeout /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 22.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/TrailersSource.kt
*/ package okhttp3 import okio.IOException /** * Returns the trailers that follow an HTTP response, blocking if they aren't ready yet. * Implementations of this interface should respond to [Call.cancel] by immediately throwing an * [IOException]. * * Most callers won't need this interface, and should use [Response.trailers] instead. *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 1.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
.build() @Test fun trailersHttp1() { trailers(Protocol.HTTP_1_1) } @Test fun trailersHttp2() { trailers(Protocol.HTTP_2) } private fun trailers(protocol: Protocol) { enableProtocol(protocol) server.enqueue( MockResponse .Builder() .addHeader("h1", "v1") .trailers(headersOf("t1", "v2")) .body(protocol, "Hello")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 18K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
*/ fun responseBodyComplete(trailers: Headers) { if (state == STATE_CLOSED) return if (state != STATE_READING_RESPONSE_BODY) throw IllegalStateException("state: $state") detachTimeout(timeout) this@Http1ExchangeCodec.trailers = trailers state = STATE_CLOSED if (trailers.size > 0) { client?.cookieJar?.receiveHeaders(url, trailers) } } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 17.5K bytes - Viewed (7) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt
for (pushPromise in pushPromises) { result.addPush(pushPromise.wrap()) } result.settings(settings) result.status(status) result.headers(headers) result.trailers(trailers) when (socketPolicy) { SocketPolicy.EXPECT_CONTINUE, SocketPolicy.CONTINUE_ALWAYS -> result.add100Continue() SocketPolicy.UPGRADE_TO_SSL_AT_END -> result.inTunnel()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 03 13:16:34 UTC 2025 - 4.1K bytes - Viewed (1) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
* @throws IOException if the trailers cannot be loaded, such as if the network connection is * dropped. */ @Throws(IOException::class) fun trailers(): Headers = trailersSource.get() /** * Returns the trailers after the HTTP response, if they are available to read immediately. Unlike * [trailers], this doesn't block if the trailers are not immediately available, and instead
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 14:39:28 UTC 2025 - 18.1K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
} socket.sleepWhileOpen(response.headersDelayNanos) stream.writeHeaders(response.toHttp2Headers(), outFinished, flushHeaders) if (trailers.size > 0) { stream.enqueueTrailers(trailers) } pushPromises(stream, request, response.pushPromises) if (body != null) { socket.sleepWhileOpen(bodyDelayNanos) val responseBodySink =
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 20:36:00 UTC 2025 - 40.3K bytes - Viewed (0) -
CHANGELOG.md
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 31.6K bytes - Viewed (1) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/ExchangeCodec.kt
interface ExchangeCodec { /** The connection or CONNECT tunnel that owns this codec. */ val carrier: Carrier /** Returns true if the response body and (possibly empty) trailers have been received. */ val isResponseComplete: Boolean /** The socket that carries this exchange. */ val socket: Socket /** Returns an output stream where the request body can be streamed. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 21:11:09 UTC 2025 - 3.3K bytes - Viewed (0)