- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 69 for responseBody (0.17 sec)
-
okhttp/src/main/kotlin/okhttp3/ResponseBody.kt
* * ```java * Call call = client.newCall(request); * call.enqueue(new Callback() { * public void onResponse(Call call, Response response) throws IOException { * try (ResponseBody responseBody = response.body()) { * ... // Use the response. * } * } * * public void onFailure(Call call, IOException e) { * ... // Handle the failure. * } * }); * ``` *
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
val responseBody = response.body.source() assertThat(responseBody.readUtf8Line()) .isEqualTo("response A") assertThat(responseBody.readUtf8Line()) .isEqualTo("response B") requestBody.writeUtf8("request C\n") requestBody.close() assertThat(responseBody.readUtf8Line()).isNull() } body.awaitSuccess() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseCommonTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt
package okhttp3.internal import okhttp3.MediaType import okhttp3.ResponseBody import okhttp3.ResponseBody.Companion.asResponseBody import okio.Buffer import okio.BufferedSource import okio.ByteString import okio.IOException import okio.use internal fun ResponseBody.commonBytes() = commonConsumeSource(BufferedSource::readByteArray) { it.size }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
assertThat(body.string()).isEqualTo("hello") } @Test fun stringClosesUnderlyingSource() { val closed = AtomicBoolean() val body: ResponseBody = object : ResponseBody() { override fun contentType(): MediaType? { return null } override fun contentLength(): Long { return 5 }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingResponseBody.kt
* limitations under the License. */ package okhttp3 import okio.BufferedSource open class ForwardingResponseBody(delegate: ResponseBody?) : ResponseBody() { private val delegate: ResponseBody fun delegate(): ResponseBody { return delegate } override fun contentType(): MediaType? { return delegate.contentType() } override fun contentLength(): Long {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseJvmTest.kt
*/ package okhttp3 import assertk.assertThat import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import kotlin.test.assertFailsWith import okhttp3.ResponseBody.Companion.asResponseBody import okhttp3.ResponseBody.Companion.toResponseBody import okio.Buffer import okio.BufferedSource import okio.Source import okio.Timeout import okio.buffer import org.junit.jupiter.api.Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
import okhttp3.CacheControl import okhttp3.Headers import okhttp3.MediaType import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody import okhttp3.ResponseBody.Companion.asResponseBody import okhttp3.internal.http.HTTP_PERM_REDIRECT import okhttp3.internal.http.HTTP_TEMP_REDIRECT import okio.Buffer import okio.IOException import okio.Source import okio.Timeout
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 5.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Progress.java
} private static class ProgressResponseBody extends ResponseBody { private final ResponseBody responseBody; private final ProgressListener progressListener; private BufferedSource bufferedSource; ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { this.responseBody = responseBody; this.progressListener = progressListener; }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 3.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Response.kt
* from [Call.execute]. Response bodies must be [closed][ResponseBody] and may * be consumed only once. * * This always returns an unreadable [ResponseBody], which may implement [ResponseBody.contentType] and [ResponseBody.contentLength], on responses returned from [cacheResponse], [networkResponse], * and [priorResponse]. */ @get:JvmName("body") val body: ResponseBody, /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 06 09:38:30 UTC 2024 - 15.6K bytes - Viewed (0)