- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for chunkedBody (0.07 sec)
-
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 17.8K bytes - Viewed (0) -
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 11.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 Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 9.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 Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 18K 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( listener, CoreMatchers.any(Long::class.java), null, greaterThan(0L),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 60.4K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 21 14:27:04 UTC 2025 - 37.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 Sep 05 11:42:10 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 113.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 146.6K bytes - Viewed (0)