Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 22 of 22 for addNetworkInterceptor (0.06 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

        val url = server.url("/")
        assertThat(get(url).body.string()).isEqualTo("A")
        val ifNoneMatch = AtomicReference<String?>()
        client =
          client
            .newBuilder()
            .addNetworkInterceptor(
              Interceptor { chain: Interceptor.Chain ->
                ifNoneMatch.compareAndSet(null, chain.request().header("If-None-Match"))
                chain.proceed(chain.request())
              },
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 113.6K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

      }
    
      @Test
      fun cancelImmediatelyAfterEnqueue() {
        server.enqueue(MockResponse())
        val latch = CountDownLatch(1)
        client =
          client
            .newBuilder()
            .addNetworkInterceptor(
              Interceptor { chain: Interceptor.Chain ->
                try {
                  latch.await()
                } catch (e: InterruptedException) {
                  throw AssertionError(e)
                }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
Back to top