- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for networkResponse (0.12 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/commonJvmAndroid/kotlin/okhttp3/internal/http/BridgeInterceptor.kt
} val networkRequest = requestBuilder.build() val networkResponse = chain.proceed(networkRequest) cookieJar.receiveHeaders(networkRequest.url, networkResponse.headers) val responseBuilder = networkResponse .newBuilder() .request(networkRequest) if (transparentGzip && "gzip".equals(networkResponse.header("Content-Encoding"), ignoreCase = true) &&
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.2K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
if (cacheResponse != null) { if (networkResponse?.code == HTTP_NOT_MODIFIED) { val response = cacheResponse .newBuilder() .headers(combine(cacheResponse.headers, networkResponse.headers)) .sentRequestAtMillis(networkResponse.sentRequestAtMillis) .receivedResponseAtMillis(networkResponse.receivedResponseAtMillis)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt
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: Wed Mar 19 19:25:20 UTC 2025 - 2K 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) -
okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt
delegate.retryDecision(call, exception, retry) } override fun followUpDecision( call: Call, networkResponse: Response, nextRequest: Request?, ) { logWithTime("followUpDecision") delegate.followUpDecision(call, networkResponse, nextRequest) } private fun logWithTime(message: String) { val startNs = startNs val timeMs =
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 6.5K 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-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
retry: Boolean, ) = logEvent(RetryDecision(System.nanoTime(), call, exception, retry)) override fun followUpDecision( call: Call, networkResponse: Response, nextRequest: Request?, ) = logEvent(FollowUpDecision(System.nanoTime(), call, networkResponse, nextRequest))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 9.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)