- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 37 for interceptor (0.1 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/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) -
samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java
.build(); Response response = client.newCall(request).execute(); response.body().close(); } private static class LoggingInterceptor implements Interceptor { @Override public Response intercept(Chain chain) throws IOException { long t1 = System.nanoTime(); Request request = chain.request(); logger.info(String.format("Sending request %s on %s%n%s",
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jan 01 15:55:32 UTC 2016 - 2K 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/src/main/kotlin/okhttp3/internal/connection/ConnectInterceptor.kt
import java.io.IOException import okhttp3.Interceptor import okhttp3.Response import okhttp3.internal.http.RealInterceptorChain /** * Opens a connection to the target server and proceeds to the next interceptor. The network might * be used for the returned response, or to validate a cached response with a conditional GET. */ object ConnectInterceptor : Interceptor { @Throws(IOException::class)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.5K bytes - Viewed (0) -
okhttp-logging-interceptor/Module.md
# Module okhttp-logging-interceptor
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Apr 02 11:27:49 UTC 2019 - 102 bytes - Viewed (0)