- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 10 for addInterceptor (0.08 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
chain.proceed(chain.request()) } client = client .newBuilder() .connectTimeout(Duration.ofSeconds(5)) .addInterceptor(interceptor1) .addInterceptor(interceptor2) .build() val request1 = Request .Builder() .url("http://" + TestUtil.UNREACHABLE_ADDRESS_IPV4) .build()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 16:11:23 GMT 2025 - 28.2K bytes - Click Count (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
else -> chain.proceed(chain.request()) } }, ).addNetworkInterceptor(networkInterceptor) .addInterceptor(applicationInterceptor) .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ).hostnameVerifier(hostnameVerifier) .build()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Nov 07 02:57:33 GMT 2025 - 39.4K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DispatcherTest.kt
} @Test fun synchronousCallAccessors() { val ready = CountDownLatch(2) val waiting = CountDownLatch(1) client = client .newBuilder() .addInterceptor( Interceptor { chain: Interceptor.Chain? -> try { ready.countDown() waiting.await() } catch (e: InterruptedException) {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 15.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorOverridesTest.kt
} else { withOverride.proceed(chain.request()) } } with(override.override) { client = client .newBuilder() .addInterceptor { chain -> testApplicationInterceptor(chain) }.addNetworkInterceptor { chain -> assertThat(isDefaultValue(chain.value())).isFalse() chain.proceed(chain.request())Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 11 02:37:00 GMT 2026 - 28.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt
val interceptor = Interceptor { chain: Interceptor.Chain -> chain.proceed(chain.request()) } val original = clientTestRule.newClient() original .newBuilder() .addInterceptor(interceptor) .addNetworkInterceptor(interceptor) .build() assertThat(original.interceptors.size).isEqualTo(0) assertThat(original.networkInterceptors.size).isEqualTo(0) } /**Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 13.4K bytes - Click Count (1) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt
private val random = Random(0) private var client = clientTestRule .newClientBuilder() .writeTimeout(Duration.ofMillis(500)) .readTimeout(Duration.ofMillis(500)) .addInterceptor( Interceptor { chain: Interceptor.Chain -> val response = chain.proceed(chain.request()) // Ensure application interceptors never see a null body.
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 35.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt
.Builder() .clearHeaders() .socketHandler(body) .build(), ) client = client .newBuilder() .addInterceptor(UppercaseRequestInterceptor()) .addInterceptor(UppercaseResponseInterceptor()) .build() val call = client.newCall( Request .Builder() .url(server.url("/"))
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 25.8K bytes - Click Count (0) -
android-test/src/androidDeviceTest/java/okhttp/android/test/OkHttpTest.kt
OkHttpClientTestRule().apply { logger = Logger.getLogger(OkHttpTest::class.java.name) } private var client: OkHttpClient = clientTestRule .newClientBuilder() .addInterceptor(CompressionInterceptor(Zstd, Brotli, Gzip)) .build() private val moshi = Moshi .Builder() .add(KotlinJsonAdapterFactory()) .build()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 29.9K bytes - Click Count (0) -
docs/changelogs/changelog_4x.md
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Click Count (0) -
CHANGELOG.md
support it. It integrates a new (unstable) [ZSTD-KMP] library, also from Square. Enable it like this: ```kotlin val client = OkHttpClient.Builder() .addInterceptor(CompressionInterceptor(Zstd, Gzip)) .build() ``` * New: Support the `QUERY` HTTP method. You will need to set the `Request.cacheUrlOverride`
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 15 11:57:47 GMT 2026 - 36.2K bytes - Click Count (2)