- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 85 for interceptor (0.24 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()) * }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 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; }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Apr 06 09:14:38 GMT 2024 - 4.5K bytes - Viewed (1) -
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`:
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 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 ->
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 27.8K 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()`.
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Dec 17 15:34:10 GMT 2023 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java
import java.util.Collections; import java.util.Set; import okhttp3.CertificatePinner; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class CheckHandshake { /** Rejects otherwise-trusted certificates. */ private static final Interceptor CHECK_HANDSHAKE_INTERCEPTOR = new Interceptor() { final Set<String> denylist = Collections.singleton(
Java - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Apr 15 14:55:09 GMT 2024 - 2.1K 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)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 1.5K 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)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 13.2K 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) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.2K bytes - Viewed (0) -
okhttp-brotli/api/okhttp-brotli.api
public final class okhttp3/brotli/BrotliInterceptor : okhttp3/Interceptor { public static final field INSTANCE Lokhttp3/brotli/BrotliInterceptor; public fun intercept (Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Feb 26 19:17:33 GMT 2022 - 220 bytes - Viewed (0)