- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for chunkedBody (0.05 sec)
-
mockwebserver/api/mockwebserver3.api
public final fun chunkedBody (Ljava/lang/String;I)Lmockwebserver3/MockResponse$Builder; public final fun chunkedBody (Lokio/Buffer;I)Lmockwebserver3/MockResponse$Builder; public static synthetic fun chunkedBody$default (Lmockwebserver3/MockResponse$Builder;Ljava/lang/String;IILjava/lang/Object;)Lmockwebserver3/MockResponse$Builder;
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 11.8K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
} /** * Sets the response body to the UTF-8 encoded bytes of [body], * chunked every [maxChunkSize] bytes. */ public fun chunkedBody( body: String, maxChunkSize: Int = Int.MAX_VALUE, ): Builder = chunkedBody(Buffer().writeUtf8(body), maxChunkSize) /** Sets the headers and returns this. */ public fun headers(headers: Headers): Builder = apply {Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 17.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt
.trailers(headersOf("caboose", "xyz")) // Trailers always work for HTTP/2, but only for chunked bodies in HTTP/1. if (http2) { mockResponse.body("abc") } else { mockResponse.chunkedBody("abc", 1) } server.enqueue(mockResponse.build()) val call = client.newCall( Request( url = server.url("/"), body = SlowRequestBody, ),
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 10.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
response.trailers() } } } private fun MockResponse.Builder.body( protocol: Protocol, body: String, ) = apply { when (protocol) { Protocol.HTTP_1_1 -> chunkedBody(body, 1024) // Force multiple chunks. else -> body(body) } } private fun enableProtocol(protocol: Protocol) { if (protocol == Protocol.HTTP_2) { enableTls() client =
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Nov 08 21:45:04 UTC 2025 - 18.8K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Nov 07 02:57:33 UTC 2025 - 39.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
enableTlsWithTunnel() server.protocols = Arrays.asList(Protocol.HTTP_1_1) server.enqueue( MockResponse .Builder() .bodyDelay(100, TimeUnit.MILLISECONDS) .chunkedBody("Hello!", 2) .build(), ) assertSuccessfulEventOrder(anyResponse) assertBytesReadWritten( eventRecorder, CoreMatchers.any(Long::class.java), null,
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
server.enqueue( MockResponse .Builder() .status("HTTP/1.0 200 Fantastic") .addHeader("A: c") .addHeader("B: d") .addHeader("A: e") .chunkedBody("ABCDE\nFGHIJ\nKLMNO\nPQR", 8) .build(), ) val request = newRequest("/") val response = getResponse(request) assertThat(response.code).isEqualTo(200)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 17:41:45 UTC 2025 - 116.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 147.4K bytes - Viewed (0)