Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 81 for interceptor (0.52 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java

    import java.io.File;
    import java.io.IOException;
    import okhttp3.Cache;
    import okhttp3.Interceptor;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    
    public final class RewriteResponseCacheControl {
      /** Dangerous interceptor that rewrites the server's cache-control header. */
      private static final Interceptor REWRITE_CACHE_CONTROL_INTERCEPTOR = chain -> {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jan 12 03:31:36 UTC 2019
    - 2.6K bytes
    - Viewed (0)
  2. docs/works_with_okhttp.md

     * [okhttp-spring-boot](https://github.com/freefair/okhttp-spring-boot): Spring Boot starters for OkHttp
     * [okhttp-staleiferror-interceptor](https://github.com/PeelTechnologies/okhttp-staleiferror-interceptor/): serve stale responses when the server isn’t reachable.
     * [okhttp-stats](https://github.com/flipkart-incubator/okhttp-stats): Get stats like average network speed.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Feb 15 16:18:51 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/DispatcherTest.kt

      fun synchronousCallAccessors() {
        val ready = CountDownLatch(2)
        val waiting = CountDownLatch(1)
        client =
          client
            .newBuilder()
            .addInterceptor(
              Interceptor { chain: Interceptor.Chain? ->
                try {
                  ready.countDown()
                  waiting.await()
                } catch (e: InterruptedException) {
                  throw AssertionError()
                }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

      private var extraNetworkInterceptor: Interceptor? = null
    
      private fun setLevel(level: Level) {
        networkInterceptor.setLevel(level)
        applicationInterceptor.setLevel(level)
      }
    
      @BeforeEach
      fun setUp() {
        client =
          OkHttpClient
            .Builder()
            .addNetworkInterceptor(
              Interceptor { chain ->
                when {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 21 14:27:04 UTC 2025
    - 37.5K bytes
    - Viewed (0)
  5. okhttp-zstd/src/test/java/okhttp3/zstd/ZstdInterceptorJavaTest.java

    import okhttp3.Gzip;
    import okhttp3.brotli.Brotli;
    import org.junit.jupiter.api.Test;
    
    class ZstdInterceptorJavaTest {
      @Test
      public void testConstructor() {
        CompressionInterceptor interceptor = new CompressionInterceptor(
          Zstd.INSTANCE,
          Gzip.INSTANCE,
          Brotli.INSTANCE
        );
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Aug 01 06:04:22 UTC 2025
    - 969 bytes
    - Viewed (0)
  6. 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)
  7. android-test/src/test/kotlin/okhttp/android/test/AndroidLoggingTest.kt

        }
    
      val request = Request("http://google.com/robots.txt".toHttpUrl())
    
      @Test
      fun testHttpLoggingInterceptor() {
        val interceptor =
          HttpLoggingInterceptor().apply {
            level = HttpLoggingInterceptor.Level.BASIC
          }
    
        val client = clientBuilder.addInterceptor(interceptor).build()
    
        try {
          client.newCall(request).execute()
        } catch (uhe: UnknownHostException) {
          // expected
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 21 14:27:04 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Protocol.kt

       * provides support.
       */
      QUIC("quic"),
    
      /**
       * HTTP/3 is the third and upcoming major version of the Hypertext Transfer Protocol used to
       * exchange information. HTTP/3 runs over QUIC, which is published as RFC 9000.
       *
       * HTTP/3 is not natively supported by OkHttp, but provided to allow a theoretical interceptor
       * that provides support.
       */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jun 23 18:58:57 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/mylasta/creator/PagerCreatorTest.java

            @Override
            public String getValidatorPackageName() {
                return "validator";
            }
    
            @Override
            public String getInterceptorPackageName() {
                return "interceptor";
            }
    
            @Override
            public String getHelperPackageName() {
                return "helper";
            }
    
            @Override
            public String getRepositoryPackageName() {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 13.6K bytes
    - Viewed (0)
  10. maven-tests/pom.xml

          <groupId>com.squareup.okhttp3</groupId>
          <artifactId>mockwebserver3</artifactId>
        </dependency>
    
        <dependency>
          <groupId>com.squareup.okhttp3</groupId>
          <artifactId>logging-interceptor</artifactId>
        </dependency>
      </dependencies>
    
      <reporting>
        <plugins>
          <plugin>
            <artifactId>maven-project-info-reports-plugin</artifactId>
          </plugin>
        </plugins>
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Jul 13 08:32:01 UTC 2025
    - 1.8K bytes
    - Viewed (0)
Back to top