- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 65 for responseBody (0.06 sec)
-
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/CompressionInterceptor.kt
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3 import okhttp3.ResponseBody.Companion.asResponseBody import okhttp3.internal.http.promisesBody import okio.BufferedSource import okio.Source import okio.buffer /** * Transparent Compressed response support. *
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 15:15:28 UTC 2025 - 2.9K bytes - Viewed (1) -
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 val request: Request, private val listener: EventSourceListener,
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 07:51:20 UTC 2025 - 3.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
exceptions.add(e) } } } fun takeException(): Exception = exceptions.take() } companion object { fun uppercase(original: ResponseBody): ResponseBody = object : ResponseBody() { override fun contentType() = original.contentType() override fun contentLength() = original.contentLength()
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 16:11:23 UTC 2025 - 28.2K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Callback.kt
* Called when the HTTP response was successfully returned by the remote server. The callback may * proceed to read the response body with [Response.body]. The response is still live until its * response body is [closed][ResponseBody]. The recipient of the callback may consume the response * body on another thread. * * Note that transport-layer success (receiving a HTTP response code, headers and body) does not
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.6K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed May 28 02:11:14 UTC 2025 - 15.4K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Aug 22 08:12:58 UTC 2025 - 4.4K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Nov 07 02:57:33 UTC 2025 - 39.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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 6.8K bytes - Viewed (0)