- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 70 for responseBody (0.76 seconds)
-
okhttp/api/android/okhttp.api
public final fun create (Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody; public final fun create (Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody; public final fun create (Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody; public final fun create (Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody; public final fun create (Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 72.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
* [closed][ResponseBody] and may be consumed only once. * * If this is a [cacheResponse], [networkResponse], or [priorResponse], the server's response body * is not available, and it is always an error to attempt read its streamed content. Reading from * [ResponseBody.source] always throws on such instances. * * It is safe and supported to call [ResponseBody.contentType] and [ResponseBody.contentLength] on
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/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
val bytes = responseBody.bytes() val charStream = responseBody.charStream() val string = responseBody.string() responseBody.close() responseBody = "".toResponseBody("".toMediaType()) responseBody = "".toResponseBody(null) responseBody = ByteString.EMPTY.toResponseBody("".toMediaType()) responseBody = ByteString.EMPTY.toResponseBody(null)
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 49.7K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
} private fun peekTrailers(protocol: Protocol) { val responseBody = "a".repeat(OKHTTP_CLIENT_WINDOW_SIZE) enableProtocol(protocol) server.enqueue( MockResponse .Builder() .addHeader("h1", "v1") .trailers(headersOf("t1", "v2")) .body(protocol, responseBody) .build(), ) val call = client.newCall(Request(server.url("/")))
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) -
samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java
@Override public void onFailure(Call call, IOException e) { 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();
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 1.9K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealResponseBody.kt
import okhttp3.ResponseBody import okio.BufferedSource class RealResponseBody( /** * Use a string to avoid parsing the content type until needed. This also defers problems caused * by malformed content types. */ private val contentTypeString: String?, private val contentLength: Long, private val source: BufferedSource, ) : ResponseBody() {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Dec 27 13:39:56 GMT 2024 - 1.2K bytes - Click Count (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt
@Throws(IOException::class) override fun intercept(chain: Chain): Response = uppercaseResponse(chain.proceed(chain.request())) private fun uppercaseResponse(response: Response): Response { val uppercaseBody: ResponseBody = object : ForwardingResponseBody(response.body) { override fun source(): BufferedSource = uppercaseSource(delegate().source()).buffer() } return response .newBuilder()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 1.8K bytes - Click Count (0) -
samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java
import com.squareup.moshi.Moshi; import com.squareup.moshi.Types; import java.util.Collections; import java.util.List; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; public class OkHttpContributors { private static final String ENDPOINT = "https://api.github.com/repos/square/okhttp/contributors"; private static final Moshi MOSHI = new Moshi.Builder().build();Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K bytes - Click Count (0) -
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 {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 16 23:20:49 GMT 2020 - 6.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/CallServerInterceptor.kt
.build() } // This is not an upgrade response. else -> { val responseBody = exchange.openResponseBody(response) response .newBuilder() .body(responseBody) .trailers( object : TrailersSource { override fun peek() = exchange.peekTrailers()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Oct 30 13:46:58 GMT 2025 - 7.6K bytes - Click Count (0)