- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for Interceptors (0.22 sec)
-
docs/features/interceptors.md
![Interceptors Diagram](../assets/images/interceptors@2x.png) ### Application Interceptors Interceptors are registered as either _application_ or _network_ interceptors. We'll use the `LoggingInterceptor` defined above to show the difference. Register an _application_ interceptor by calling `addInterceptor()` on `OkHttpClient.Builder`:
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 8.1K bytes - Viewed (0) -
okhttp/src/main/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()) * }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/RealInterceptorChain.kt
// Call the next interceptor in the chain. val next = copy(index = index + 1, request = request) val interceptor = interceptors[index] @Suppress("USELESS_ELVIS") val response = interceptor.intercept(next) ?: throw NullPointerException( "interceptor $interceptor returned null", ) if (exchange != null) { check(index + 1 >= interceptors.size || next.calls == 1) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp-logging-interceptor/README.md
```java logging.redactHeader("Authorization"); logging.redactHeader("Cookie"); ``` Download -------- ```kotlin implementation("com.squareup.okhttp3:logging-interceptor:4.12.0") ```
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 1.3K bytes - Viewed (0) -
mkdocs.yml
'calls.md': 'features/calls.md' 'connections.md': 'features/connections.md' 'events.md': 'features/events.md' 'https.md': 'features/events.md' 'interceptors.md': 'features/interceptors.md' 'r8_proguard.md': 'features/r8_proguard.md' # Redirect all Security pages to security/* 'security.md': 'security/security.md'
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Nov 20 15:26:12 UTC 2023 - 3.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt
import java.net.ProtocolException import okhttp3.Interceptor import okhttp3.Response import okhttp3.internal.connection.Exchange import okhttp3.internal.http2.ConnectionShutdownException import okhttp3.internal.stripBody import okio.buffer /** This is the last interceptor in the chain. It makes a network call to the server. */ class CallServerInterceptor(private val forWebSocket: Boolean) : Interceptor { @Throws(IOException::class)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Authenticator.kt
* the proxy. This proxy connection is called a "TLS Tunnel" and is specified by * [RFC 2817][1]. The HTTP CONNECT request that creates this tunnel connection is special: it * does not participate in any [interceptors][Interceptor] or [event listeners][EventListener]. It * doesn't include the motivating request's HTTP headers or even its full URL; only the target * server's hostname is sent to the proxy. *
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt
import okio.IOException import org.junit.jupiter.api.Assertions open class RecordingConnectionListener( /** * An override to ignore the normal order that is enforced. * EventListeners added by Interceptors will not see all events. */ private val enforceOrder: Boolean = true, ) : ConnectionListener() { val eventSequence: Deque<ConnectionEvent> = ConcurrentLinkedDeque()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt
proxy = proxy, socketAddress = socketAddress, ) } fun newChain(call: RealCall): RealInterceptorChain { return RealInterceptorChain( call = call, interceptors = listOf(), index = 0, exchange = null, request = call.request(), connectTimeoutMillis = 10_000, readTimeoutMillis = 10_000, writeTimeoutMillis = 10_000, ) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 7.7K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
import okhttp3.CallEvent.SecureConnectStart import org.junit.jupiter.api.Assertions.fail open class RecordingEventListener( /** * An override to ignore the normal order that is enforced. * EventListeners added by Interceptors will not see all events. */ private val enforceOrder: Boolean = true, ) : EventListener() { val eventSequence: Deque<CallEvent> = ConcurrentLinkedDeque() private val forbiddenLocks = mutableListOf<Any>()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9K bytes - Viewed (0)