- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for networkResponse (0.09 sec)
-
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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Mar 22 07:09:21 UTC 2024 - 10.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/BridgeInterceptor.kt
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) && networkResponse.promisesBody() ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 5.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Response.kt
@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", replaceWith = ReplaceWith(expression = "cacheResponse"),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 06 09:38:30 UTC 2024 - 15.6K 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() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K 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 =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K 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()
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 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0)