- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for withConnectTimeout (0.08 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealInterceptorChain.kt
get() = call.client.followRedirects override fun connection(): Connection? = exchange?.connection override fun connectTimeoutMillis(): Int = connectTimeoutMillis override fun withConnectTimeout( timeout: Int, unit: TimeUnit, ): Interceptor.Chain { check(exchange == null) { "Timeouts can't be adjusted in a network interceptor" }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 12.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
} @Test fun connectTimeout() { val interceptor1 = Interceptor { chainA: Interceptor.Chain -> assertThat(chainA.connectTimeoutMillis()).isEqualTo(5000) val chainB = chainA.withConnectTimeout(100, TimeUnit.MILLISECONDS) assertThat(chainB.connectTimeoutMillis()).isEqualTo(100) chainB.proceed(chainA.request()) } val interceptor2 = Interceptor { chain: Interceptor.Chain ->
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/src/jvmTest/kotlin/okhttp3/InterceptorOverridesTest.kt
object ConnectTimeoutOverride : Override<Int> { override fun Interceptor.Chain.value(): Int = connectTimeoutMillis() override fun Interceptor.Chain.withOverride(value: Int): Interceptor.Chain = withConnectTimeout(value, TimeUnit.MILLISECONDS) override fun OkHttpClient.Builder.withOverride(value: Int): OkHttpClient.Builder = connectTimeout(value.toLong(), TimeUnit.MILLISECONDS)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)