- Sort Score
- Num 10 results
- Language All
Results 1 - 8 of 8 for withReadTimeout (0.07 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt
/** * Returns the read timeout in milliseconds. */ fun readTimeoutMillis(): Int /** * Returns a new chain with the specified read timeout. */ fun withReadTimeout( timeout: Int, unit: TimeUnit, ): Chain /** * Returns the write timeout in milliseconds. */ fun writeTimeoutMillis(): 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
return copy(connectTimeoutMillis = checkDuration("connectTimeout", timeout.toLong(), unit)) } override fun readTimeoutMillis(): Int = readTimeoutMillis override fun withReadTimeout( 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 chainWithReadTimeout() { val interceptor1 = Interceptor { chainA: Interceptor.Chain -> assertThat(chainA.readTimeoutMillis()).isEqualTo(5000) val chainB = chainA.withReadTimeout(100, TimeUnit.MILLISECONDS) assertThat(chainB.readTimeoutMillis()).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 ReadTimeoutOverride : Override<Int> { override fun Interceptor.Chain.value(): Int = readTimeoutMillis() override fun Interceptor.Chain.withOverride(value: Int): Interceptor.Chain = withReadTimeout(value, TimeUnit.MILLISECONDS) override fun OkHttpClient.Builder.withOverride(value: Int): OkHttpClient.Builder = readTimeout(value.toLong(), TimeUnit.MILLISECONDS) override val nonDefaultValue: Int = 5000Created: 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 withConnectTimeout( timeout: Int, unit: TimeUnit, ): Interceptor.Chain = TODO() override fun readTimeoutMillis(): Int = TODO() override fun withReadTimeout( timeout: Int, unit: TimeUnit, ): Interceptor.Chain = TODO() override fun writeTimeoutMillis(): Int = TODO() override fun withWriteTimeout(
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 withProxyAuthenticator (Lokhttp3/Authenticator;)Lokhttp3/Interceptor$Chain; public abstract fun withProxySelector (Ljava/net/ProxySelector;)Lokhttp3/Interceptor$Chain; public abstract fun withReadTimeout (ILjava/util/concurrent/TimeUnit;)Lokhttp3/Interceptor$Chain; public abstract fun withRetryOnConnectionFailure (Z)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 withProxyAuthenticator (Lokhttp3/Authenticator;)Lokhttp3/Interceptor$Chain; public abstract fun withProxySelector (Ljava/net/ProxySelector;)Lokhttp3/Interceptor$Chain; public abstract fun withReadTimeout (ILjava/util/concurrent/TimeUnit;)Lokhttp3/Interceptor$Chain; public abstract fun withRetryOnConnectionFailure (Z)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)