- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for networkResponse (0.26 sec)
-
okhttp/src/main/kotlin/okhttp3/Response.kt
val isRedirect: Boolean = commonIsRedirect @JvmName("-deprecated_networkResponse") @Deprecated( message = "moved to val", replaceWith = ReplaceWith(expression = "networkResponse"), level = DeprecationLevel.ERROR, ) fun networkResponse(): Response? = networkResponse @JvmName("-deprecated_cacheResponse") @Deprecated( message = "moved to val",
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 15.5K bytes - Viewed (0) -
okhttp/src/main/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)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Mar 22 07:09:21 GMT 2024 - 10.2K 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")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2K bytes - Viewed (2) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
fun Response.Builder.commonBody(body: ResponseBody) = apply { this.body = body } fun Response.Builder.commonNetworkResponse(networkResponse: Response?) = apply { checkSupportResponse("networkResponse", networkResponse) this.networkResponse = networkResponse } fun Response.Builder.commonCacheResponse(cacheResponse: Response?) = apply { checkSupportResponse("cacheResponse", cacheResponse)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:24:48 GMT 2024 - 5.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RecordedResponse.kt
*/ fun networkResponse(): RecordedResponse { val networkResponse = response!!.networkResponse!! return RecordedResponse(networkResponse.request, networkResponse, null, null, null) } /** Asserts that the current response didn't use the network. */ fun assertNoNetworkResponse() = apply { assertThat(response!!.networkResponse).isNull() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java
System.out.println("Response 1 response: " + response1); System.out.println("Response 1 cache response: " + response1.cacheResponse()); System.out.println("Response 1 network response: " + response1.networkResponse()); } String response2Body; try (Response response2 = client.newCall(request).execute()) { if (!response2.isSuccessful()) throw new IOException("Unexpected code " + response2);
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 2.4K 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();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 4.6K bytes - Viewed (0) -
okhttp/src/test/java/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() val request =
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 27.8K bytes - Viewed (0) -
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...
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt
val message: String = response.message() val handshake: Handshake? = response.handshake() 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()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13.3K bytes - Viewed (0)