- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 77 for interceptor (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-logging-interceptor/api/logging-interceptor.api
public fun intercept (Lokhttp3/Interceptor$Chain;)Lokhttp3/Response; public final fun level (Lokhttp3/logging/HttpLoggingInterceptor$Level;)V public final fun redactHeader (Ljava/lang/String;)V public final fun redactQueryParams ([Ljava/lang/String;)V public final fun setLevel (Lokhttp3/logging/HttpLoggingInterceptor$Level;)Lokhttp3/logging/HttpLoggingInterceptor; }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 4.5K bytes - Viewed (0) -
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/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/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/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
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(private val client: OkHttpClient) : Interceptor { @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { val realChain = chain as RealInterceptorChain
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12.1K 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)