- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for Interceptors (0.09 sec)
-
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/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
// Build a full stack of interceptors. val interceptors = mutableListOf<Interceptor>() interceptors += client.interceptors interceptors += RetryAndFollowUpInterceptor(client) interceptors += BridgeInterceptor(client.cookieJar) interceptors += CacheInterceptor(client.cache) interceptors += ConnectInterceptor if (!forWebSocket) { interceptors += client.networkInterceptors }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 17.9K 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) -
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
} /** * Returns a modifiable list of interceptors that observe the full span of each call: from * before the connection is established (if any) until after the response source is selected * (either the origin server, cache, or both). */ fun interceptors(): MutableList<Interceptor> = interceptors fun addInterceptor(interceptor: Interceptor) = apply { interceptors += interceptor
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:21:33 UTC 2024 - 52K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Request.kt
* [Request.tag]. Use null to remove any existing tag assigned for [T]. * * Use this API to attach timing, debugging, or other application data to a request so that * you may read it in interceptors, event listeners, or callbacks. */ @JvmName("reifiedTag") inline fun <reified T : Any> tag(tag: T?): Builder = tag(T::class, tag) /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:17:44 UTC 2024 - 10.5K 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/test/java/okhttp3/OkHttpClientTest.kt
@Test fun clonedInterceptorsListsAreIndependent() { val interceptor = Interceptor { chain: Interceptor.Chain -> chain.proceed(chain.request()) } val original = clientTestRule.newClient() original.newBuilder() .addInterceptor(interceptor) .addNetworkInterceptor(interceptor) .build() assertThat(original.interceptors.size).isEqualTo(0)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 13.2K bytes - Viewed (0) -
okhttp/src/test/java/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() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
} val interceptor2 = Interceptor { chain: Interceptor.Chain -> assertThat(chain.writeTimeoutMillis()).isEqualTo(100) chain.proceed(chain.request()) } client = client.newBuilder() .writeTimeout(Duration.ofSeconds(5)) .addInterceptor(interceptor1) .addInterceptor(interceptor2) .build() server.enqueue(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K bytes - Viewed (0)