- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 51 for Interceptor (0.08 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-logging-interceptor/api/logging-interceptor.api
public final class okhttp3/logging/HttpLoggingInterceptor : okhttp3/Interceptor { public static final field Companion Lokhttp3/logging/HttpLoggingInterceptor$Companion; public final fun -deprecated_level ()Lokhttp3/logging/HttpLoggingInterceptor$Level; public fun <init> ()V public fun <init> (Lokhttp3/logging/HttpLoggingInterceptor$Logger;)V public synthetic fun <init> (Lokhttp3/logging/HttpLoggingInterceptor$Logger;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 4.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
assertThat(expected.message).isEqualTo( "network interceptor $interceptor must call proceed() exactly once", ) } } @Test fun networkInterceptorsCannotChangeServerAddress() { server.enqueue( MockResponse.Builder() .code(500) .build(), ) val interceptor = Interceptor { chain: Interceptor.Chain ->
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K 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/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-brotli/src/main/kotlin/okhttp3/brotli/BrotliInterceptor.kt
*/ package okhttp3.brotli import okhttp3.Interceptor import okhttp3.Response import okhttp3.brotli.internal.uncompress /** * Transparent Brotli response support. * * Adds Accept-Encoding: br to request and checks (and strips) for Content-Encoding: br in * responses. n.b. this replaces the transparent gzip compression in BridgeInterceptor. */ object BrotliInterceptor : Interceptor {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
okhttp-logging-interceptor/README.md
Logging Interceptor =================== An [OkHttp interceptor][interceptors] which logs HTTP request and response data. ```java HttpLoggingInterceptor logging = new HttpLoggingInterceptor(); logging.setLevel(Level.BASIC); OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(logging) .build(); ``` You can change the log level at any time by calling `setLevel()`.
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-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
* * The format of the logs created by this class should not be considered stable and may * change slightly between releases. If you need a stable logging format, use your own interceptor. */ class HttpLoggingInterceptor @JvmOverloads constructor( private val logger: Logger = Logger.DEFAULT, ) : Interceptor {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 11.2K 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)