- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for networkResponse (2.9 sec)
-
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 10.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/EventListenerAdapter.kt
retry: Boolean, ) = onEvent(RetryDecision(System.nanoTime(), call, exception, retry)) override fun followUpDecision( call: Call, networkResponse: Response, nextRequest: Request?, ) = onEvent(FollowUpDecision(System.nanoTime(), call, networkResponse, nextRequest))
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 7.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 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/EventListener.kt
* * [OkHttpClient.authenticator] must respond to an authorization challenge. * * @param networkResponse the intermediate response that may require a follow-up request. * @param nextRequest the follow-up request that will be made. Null if no follow-up will be made. */ open fun followUpDecision( call: Call, networkResponse: Response, nextRequest: Request?, ) { }
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 21:03:04 UTC 2025 - 24.9K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt
override fun retryDecision( call: Call, exception: IOException, retry: Boolean, ) { logWithTime("retryDecision") } override fun followUpDecision( call: Call, networkResponse: Response, nextRequest: Request?, ) { logWithTime("followUpDecision") } private fun logWithTime(message: String) { val startNs = startNs val timeMs =
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 21:03:04 UTC 2025 - 5.4K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/CallEvent.kt
val exception: IOException, val retry: Boolean, ) : CallEvent() data class FollowUpDecision( override val timestampNs: Long, override val call: Call, val networkResponse: Response, val nextRequest: Request?, ) : CallEvent()Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Mon Oct 06 13:40:20 UTC 2025 - 7.4K 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 Dec 26 11:42:13 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 29.9K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 17:41:45 UTC 2025 - 26.8K bytes - Viewed (0)