- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for networkResponse (0.22 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
} open fun socket(socket: Socket) = apply { this.socket = socket } open fun networkResponse(networkResponse: Response?) = apply { checkSupportResponse("networkResponse", networkResponse) this.networkResponse = networkResponse } open fun cacheResponse(cacheResponse: Response?) = apply {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 14:39:28 UTC 2025 - 18.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
// The network response also has everything, including the raw gzipped content. val networkResponse = chain.proceed(networkRequest) assertThat(networkResponse.header("Content-Encoding")).isEqualTo("gzip") networkResponse } client = client .newBuilder() .addNetworkInterceptor(interceptor) .build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 28.2K bytes - Viewed (0) -
okhttp-zstd/src/test/java/okhttp3/zstd/ZstdTestMain.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 20:01:04 UTC 2025 - 1.3K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { String responseSource = response.networkResponse() != null ? ("(network: " + response.networkResponse().code() + " over " + response.protocol() + ")") : "(cache)"; int responseCode = response.code();
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jul 23 00:58:06 UTC 2025 - 5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
val body: ResponseBody = response.body val builder: Response.Builder = response.newBuilder() val redirect: Boolean = response.isRedirect val networkResponse: Response? = response.networkResponse val cacheResponse: Response? = response.cacheResponse val priorResponse: Response? = response.priorResponse val challenges: List<Challenge> = response.challenges()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0) -
docs/recipes.md
println("Response 1 response: $it") println("Response 1 cache response: ${it.cacheResponse}") println("Response 1 network response: ${it.networkResponse}") return@use it.body!!.string() } val response2Body = client.newCall(request).execute().use { if (!it.isSuccessful) throw IOException("Unexpected code $it")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
assertNotNull(it.networkResponse) assertEquals(3, it.cacheControl.maxAgeSeconds) assertTrue(it.cacheControl.isPublic) } client .newCall(request) .execute() .use { assertEquals(200, it.code) assertNotNull(it.cacheResponse) assertNull(it.networkResponse) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 14:12:28 UTC 2025 - 29K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt
// Use the request headers sent over the network, since that's what the response varies on. // Otherwise OkHttp-supplied headers like "Accept-Encoding: gzip" may be lost. val requestHeaders = networkResponse!!.request.headers val responseHeaders = headers return varyHeaders(requestHeaders, responseHeaders) } /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 26.9K bytes - Viewed (0) -
okhttp/api/jvm/okhttp.api
public final fun headers (Ljava/lang/String;)Ljava/util/List; public final fun isRedirect ()Z public final fun isSuccessful ()Z public final fun message ()Ljava/lang/String; public final fun networkResponse ()Lokhttp3/Response; public final fun newBuilder ()Lokhttp3/Response$Builder; public final fun peekBody (J)Lokhttp3/ResponseBody; public final fun peekTrailers ()Lokhttp3/Headers;
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K bytes - Viewed (0) -
CHANGELOG.md
``` * New: `Response.body` is now non-null. This was generally the case in OkHttp 4.x, but the Kotlin type declaration was nullable to support rare cases like the body on `Response.cacheResponse`, `Response.networkResponse`, and `Response.priorResponse`. In such cases the body is now non-null, but attempts to read its content will fail. * New: Kotlin-specific APIs for request tags. Kotlin language users can lookup tags with a type
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 31.6K bytes - Viewed (1)