- Sort Score
- Num 10 results
- Language All
Results 1 - 8 of 8 for withConnectTimeout (0.15 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt
/** * Returns the connect timeout in milliseconds. */ fun connectTimeoutMillis(): Int /** * Returns a new chain with the specified connect timeout. */ fun withConnectTimeout( timeout: Int, unit: TimeUnit, ): Chain /** * Returns the read timeout in milliseconds. */ fun readTimeoutMillis(): Int /**Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 8.9K bytes - Click Count (0) -
docs/features/interceptors.md
* Permitted to short-circuit and not call `Chain.proceed()`. * Permitted to retry and make multiple calls to `Chain.proceed()`. * Can adjust Call timeouts using withConnectTimeout, withReadTimeout, withWriteTimeout. **Network Interceptors** * Able to operate on intermediate responses like redirects and retries. * Not invoked for cached responses that short-circuit the network.
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 8.1K bytes - Click Count (0) -
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) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
override fun connection(): Connection? = TODO() override fun call(): Call = TODO() override fun connectTimeoutMillis(): Int = TODO() override fun withConnectTimeout( timeout: Int, unit: TimeUnit, ): Interceptor.Chain = TODO() override fun readTimeoutMillis(): Int = TODO() override fun withReadTimeout(Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 49.7K bytes - Click Count (0) -
okhttp/api/jvm/okhttp.api
public abstract fun withCache (Lokhttp3/Cache;)Lokhttp3/Interceptor$Chain; public abstract fun withCertificatePinner (Lokhttp3/CertificatePinner;)Lokhttp3/Interceptor$Chain; public abstract fun withConnectTimeout (ILjava/util/concurrent/TimeUnit;)Lokhttp3/Interceptor$Chain; public abstract fun withConnectionPool (Lokhttp3/ConnectionPool;)Lokhttp3/Interceptor$Chain;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 72.3K bytes - Click Count (0) -
okhttp/api/android/okhttp.api
public abstract fun withCache (Lokhttp3/Cache;)Lokhttp3/Interceptor$Chain; public abstract fun withCertificatePinner (Lokhttp3/CertificatePinner;)Lokhttp3/Interceptor$Chain; public abstract fun withConnectTimeout (ILjava/util/concurrent/TimeUnit;)Lokhttp3/Interceptor$Chain; public abstract fun withConnectionPool (Lokhttp3/ConnectionPool;)Lokhttp3/Interceptor$Chain;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 72.3K bytes - Click Count (0)