Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for Interceptors (1.46 sec)

  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`:
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  2. docs/assets/images/interceptors@2x.png

    interceptors@2x.png...
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 83.7K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. okhttp-logging-interceptor/README.md

    ```java
    logging.redactHeader("Authorization");
    logging.redactHeader("Cookie");
    ```
    
    Download
    --------
    
    ```kotlin
    implementation("com.squareup.okhttp3:logging-interceptor:5.1.0")
    ```
    
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  6. mkdocs.yml

            'calls.md': 'features/calls.md'
            'connections.md': 'features/connections.md'
            'events.md': 'features/events.md'
            'https.md': 'features/events.md'
            'interceptors.md': 'features/interceptors.md'
            'r8_proguard.md': 'features/r8_proguard.md'
            # Redirect all Security pages to security/*
            'security.md': 'security/security.md'
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Nov 21 07:19:31 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 51.7K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_2x.md

        running SSLv3, you must manually configure your own `ConnectionSpec`.
    
     *  **OkHttp now offers interceptors.** Interceptors are a powerful mechanism
        that can monitor, rewrite, and retry calls. The [interceptors doc][interceptors] is a full
        introduction to this new API.
    
     *  New: APIs to iterate and selectively clear the response cache.
     *  New: Support for SOCKS proxies.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 26.6K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 13.4K bytes
    - Viewed (0)
Back to top