- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 112 for intercepted (0.26 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
client .newBuilder() .addNetworkInterceptor( Interceptor { chain: Interceptor.Chain -> ifNoneMatch.compareAndSet(null, chain.request().header("If-None-Match")) chain.proceed(chain.request()) }, ).build() // Confirm the value is cached and intercepted. assertThat(get(url).body.string()).isEqualTo("A")Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Mar 20 09:13:37 GMT 2026 - 121K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt
* } * ``` */ fun interface Interceptor { @Throws(IOException::class) fun intercept(chain: Chain): Response companion object { /** * Constructs an interceptor for a lambda. This compact syntax is most useful for inline * interceptors. * * ```kotlin * val interceptor = Interceptor { chain: Interceptor.Chain -> * chain.proceed(chain.request()) * }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) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/BridgeInterceptor.kt
* request. Then it proceeds to call the network. Finally it builds a user response from the network * response. */ class BridgeInterceptor : Interceptor { @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { val userRequest = chain.request() val requestBuilder = userRequest.newBuilder() val body = userRequest.body if (body != null) {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Jan 11 12:06:21 GMT 2026 - 4.2K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealInterceptorChain.kt
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/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
import okhttp3.internal.stripBody import okhttp3.internal.withSuppressed /** * This interceptor recovers from failures and follows redirects as necessary. It may throw an * [IOException] if the call was canceled. */ class RetryAndFollowUpInterceptor : Interceptor { @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { val realChain = chain as RealInterceptorChain var request = chain.requestCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 12.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
import okio.Buffer import okio.Source import okio.Timeout import okio.buffer /** Serves requests from the cache and writes responses to the cache. */ class CacheInterceptor : Interceptor { @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { val call = chain.call() val cache = chain.cache val cacheCandidate = cache?.get(chain.request().requestForCache())Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Jan 11 12:06:21 GMT 2026 - 10.3K bytes - Click Count (0) -
docs/fr/docs/tutorial/dependencies/dependencies-with-yield.md
Si vous souhaitez intercepter des exceptions et créer une réponse personnalisée en fonction de cela, créez un [Gestionnaire d'exceptions personnalisé](../handling-errors.md#install-custom-exception-handlers). ## Utiliser des dépendances avec `yield` et `except` { #dependencies-with-yield-and-except }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 13.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
builder = builder.encodedFragment("") val httpUrl: HttpUrl = builder.build() } @Test fun interceptor() { var interceptor: Interceptor = Interceptor { TODO() } interceptor = Interceptor { it: Interceptor.Chain -> TODO() } } @Test fun interceptorChain() { val chain: Interceptor.Chain = newInterceptorChain() } @Test fun handshakeCertificates() {
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 withDns (Lokhttp3/Dns;)Lokhttp3/Interceptor$Chain; public abstract fun withHostnameVerifier (Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/Interceptor$Chain; public abstract fun withProxy (Ljava/net/Proxy;)Lokhttp3/Interceptor$Chain; public abstract fun withProxyAuthenticator (Lokhttp3/Authenticator;)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 withDns (Lokhttp3/Dns;)Lokhttp3/Interceptor$Chain; public abstract fun withHostnameVerifier (Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/Interceptor$Chain; public abstract fun withProxy (Ljava/net/Proxy;)Lokhttp3/Interceptor$Chain; public abstract fun withProxyAuthenticator (Lokhttp3/Authenticator;)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)