- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 51 for ResponseBody (0.05 sec)
-
samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java
import okhttp3.EventListener; import okhttp3.Handshake; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; public final class PrintEvents { private final OkHttpClient client = new OkHttpClient.Builder() .eventListenerFactory(PrintingEventListener.FACTORY) .build(); public void run() throws Exception {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 6.1K bytes - Viewed (0) -
okhttp/src/commonTest/kotlin/okhttp3/CompressionInterceptorTest.kt
*/ package okhttp3 import assertk.assertThat import assertk.assertions.isEqualTo import assertk.assertions.isNull import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.ResponseBody.Companion.asResponseBody import okhttp3.ResponseBody.Companion.toResponseBody import okio.Buffer import okio.ByteString.Companion.encodeUtf8 import okio.GzipSink import okio.Source import okio.buffer import org.junit.jupiter.api.Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MultipartReaderTest.kt
| |abcd |--simple boundary-- """.trimMargin() .replace("\n", "\r\n") val responseBody = multipart.toResponseBody( "application/multipart; boundary=\"simple boundary\"".toMediaType(), ) val parts = MultipartReader(responseBody) assertThat(parts.boundary).isEqualTo("simple boundary") val part = parts.nextPart()!!
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 02:11:14 UTC 2025 - 15.4K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
* limitations under the License. */ package okhttp3.sse.internal import java.io.IOException import okhttp3.Call import okhttp3.Callback import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody import okhttp3.internal.stripBody import okhttp3.sse.EventSource import okhttp3.sse.EventSourceListener internal class RealEventSource private constructor( private val call: Call?,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 3.3K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt
import okhttp3.CompressionInterceptor import okhttp3.Gzip import okhttp3.MediaType.Companion.toMediaType import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody.Companion.toResponseBody import okio.ByteString import okio.ByteString.Companion.EMPTY import okio.ByteString.Companion.decodeHex import okio.ByteString.Companion.encodeUtf8 import org.junit.jupiter.api.Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Aug 22 08:12:58 UTC 2025 - 4.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Call.kt
/** * Invokes the request immediately, and blocks until the response can be processed or is in error. * * To avoid leaking resources callers should close the [Response] which in turn will close the * underlying [ResponseBody]. * * ```java * // ensure the response (and underlying response body) is closed * try (Response response = client.newCall(request).execute()) { * ... * } * ``` *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 3.6K bytes - Viewed (0) -
okhttp-zstd/src/test/java/okhttp3/zstd/ZstdInterceptorTest.kt
import okhttp3.CompressionInterceptor import okhttp3.Gzip import okhttp3.MediaType.Companion.toMediaType import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody.Companion.toResponseBody import okio.Buffer import okio.ByteString import okio.ByteString.Companion.EMPTY import okio.ByteString.Companion.encodeUtf8 import okio.Sink import okio.buffer import okio.gzip
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 4.8K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
request() .post("Uncompressed".toRequestBody()) .gzip() .build(), ).execute() val responseBody = response.body assertThat(responseBody.string(), "Expected response body to be valid") .isEqualTo("Uncompressed") responseBody.close() networkLogs .assertLogEqual("--> POST $url http/1.1") .assertLogEqual("Content-Encoding: gzip")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 21 14:27:04 UTC 2025 - 37.5K bytes - Viewed (0) -
docs/recipes.md
e.printStackTrace(); } @Override public void onResponse(Call call, Response response) throws IOException { try (ResponseBody responseBody = response.body()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); Headers responseHeaders = response.headers();
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
* [RequestBody.writeTo] after that method returns. For duplex requests bodies that condition is * lifted. Such writes occur on an application-provided thread and may occur concurrently with * reads of the [ResponseBody]. For duplex request bodies, [writeTo] should return * quickly, possibly by handing off the provided request body to another thread to perform * writing. *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 9K bytes - Viewed (0)