- Sort Score
- Result 10 results
- Languages All
Results 61 - 67 of 67 for Interceptors (0.05 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt
// Capture the connection so that we can later make it stale. var connection: RealConnection? = null client = client .newBuilder() .addNetworkInterceptor( Interceptor { chain -> connection = chain.connection() as RealConnection chain.proceed(chain.request()) }, ).build() server.enqueue( MockResponse
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 8.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/FastFallbackTest.kt
} client = client .newBuilder() .protocols(listOf(Protocol.H2_PRIOR_KNOWLEDGE)) .socketFactory(socketFactory) .addNetworkInterceptor( Interceptor { chain -> try { chain.proceed(chain.request()) } finally { firstConnectLatch.countDown() } }, ).build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 10.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt
server.enqueue(MockResponse(body = "DEF")) val client2 = client .newBuilder() .addNetworkInterceptor( object : Interceptor { var executedCall = false override fun intercept(chain: Interceptor.Chain): Response { if (!executedCall) { // At this point, we have a healthy HTTP/2 connection. This call will trigger the
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 73.4K bytes - Viewed (0) -
okhttp/src/androidMain/baseline-prof.txt
HSPLokhttp3/internal/http/BridgeInterceptor;-><init>(Lokhttp3/CookieJar;)V HSPLokhttp3/internal/http/BridgeInterceptor;->intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response; HSPLokhttp3/internal/http/CallServerInterceptor;-><init>(Z)V HSPLokhttp3/internal/http/CallServerInterceptor;->intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response; HSPLokhttp3/internal/http/HttpHeaders;-><clinit>()V
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Dec 30 23:28:56 UTC 2024 - 127.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
// Seed the cache. val url = server.url("/") assertThat(get(url).body.string()).isEqualTo("A") // Confirm the interceptor isn't exercised. client = client .newBuilder() .addNetworkInterceptor(Interceptor { chain: Interceptor.Chain? -> throw AssertionError() }) .build() assertThat(get(url).body.string()).isEqualTo("A") } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 113.6K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/RealWebSocket.kt
"Expected 'Sec-WebSocket-Accept' header value '$acceptExpected' but was '$headerAccept'", ) } return response.socket ?: throw ProtocolException("Web Socket socket missing: bad interceptor?") } /** * This accepts a [BufferedSource] instead of using [Socket.source], just in case we've already * received data from the peer. This accepts a [BufferedSink] for symmetry with the source. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 21.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
* as a **network interceptor**. It will strip the `Location` header of impacted responses to * prevent the redirect. * * ``` * OkHttpClient client = client.newBuilder() * .addNetworkInterceptor(new LegacyRedirectInterceptor()) * .build(); * ``` */ internal class LegacyRedirectInterceptor : Interceptor {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0)