- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for CacheResponse (0.16 sec)
-
docs/features/caching.md
received followed by a cache hit or miss. Critically in the cache hit scenario the server won’t send the response body. The response will have non-null `cacheResponse` and `networkResponse`. The cacheResponse will be used as the top level response only if the response code is HTTP/1.1 304 Not Modified. - CallStart - **CacheConditionalHit** - ConnectionAcquired - ... Standard Events...
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt
val headers: Headers = response.headers() val body: ResponseBody = response.body() val networkResponse: Response? = response.networkResponse() val cacheResponse: Response? = response.cacheResponse() val priorResponse: Response? = response.priorResponse() val cacheControl: CacheControl = response.cacheControl() val sentRequestAtMillis: Long = response.sentRequestAtMillis()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
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() val cacheControl: CacheControl = response.cacheControl
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
* **PushPromise**: headers, method, path, response * **Request**: body, cacheControl, headers, method, url * **Response**: body, cacheControl, cacheResponse, code, handshake, headers, message, networkResponse, priorResponse, protocol, receivedResponseAtMillis, request, sentRequestAtMillis * **Route**: address, proxy, socketAddress * **TlsVersion**: javaName
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
assertNull(it.cacheResponse) 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
requestCount++ if (cacheStrategy.networkRequest != null) { // If this is a conditional request, we'll increment hitCount if/when it hits. networkCount++ } else if (cacheStrategy.cacheResponse != null) { // This response uses the cache and not the network. That's a cache hit. hitCount++ } } @Synchronized internal fun trackConditionalCacheHit() { hitCount++ }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K 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.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:31:39 UTC 2024 - 21.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
val request = Request(server.url("/abc")) val response = testBasicCachingRules(request) assertThat(response.request.url).isEqualTo(request.url) assertThat(response.cacheResponse!!.request.url).isEqualTo(request.url) } @Test fun postWithOverrideResponse() { val url = server.url("/abc?token=123")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
.assertReceivedResponseAtMillis(request1SentAt, request1ReceivedAt) // Check the cached response. Its request contains only the saved Vary headers. cacheHit.cacheResponse() .assertCode(200) .assertHeaders( Headers.Builder() .add("ETag", "v1") .add("Cache-Control", "max-age=60") .add("Vary", "Accept-Charset")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
okhttp/api/okhttp.api
public final fun -deprecated_sentRequestAtMillis ()J public final fun body ()Lokhttp3/ResponseBody; public final fun cacheControl ()Lokhttp3/CacheControl; public final fun cacheResponse ()Lokhttp3/Response; public final fun challenges ()Ljava/util/List; public fun close ()V public final fun code ()I public final fun handshake ()Lokhttp3/Handshake;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 70.2K bytes - Viewed (0)