Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 66 for Chalin (0.14 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

    import java.io.IOException
    import okhttp3.Interceptor.Chain
    import okio.Buffer
    import okio.BufferedSink
    import okio.ForwardingSink
    import okio.Sink
    import okio.buffer
    
    /** Rewrites the request body sent to the server to be all uppercase.  */
    class UppercaseRequestInterceptor : Interceptor {
      @Throws(IOException::class)
      override fun intercept(chain: Chain): Response {
        return chain.proceed(uppercaseRequest(chain.request()))
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java

        @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",
              request.url(), chain.connection(), request.headers()));
          Response response = chain.proceed(request);
    
          long t2 = System.nanoTime();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jan 01 15:55:32 GMT 2016
    - 2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

      @Throws(IOException::class)
      override fun intercept(chain: Interceptor.Chain): Response {
        val call = chain.call()
        val cacheCandidate = cache?.get(chain.request().requestForCache())
    
        val now = System.currentTimeMillis()
    
        val strategy = CacheStrategy.Factory(now, chain.request(), cacheCandidate).compute()
        val networkRequest = strategy.networkRequest
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

    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)
      override fun intercept(chain: Interceptor.Chain): Response {
        val realChain = chain as RealInterceptorChain
        val exchange = realChain.exchange!!
        val request = realChain.request
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        val interceptedCount = AtomicInteger()
        client =
          client.newBuilder()
            .addInterceptor(
              Interceptor { chain: Interceptor.Chain ->
                assertThat(chain.request().body).isNull()
                val response = chain.proceed(chain.request())
                assertThat(response.header("Connection")).isEqualTo("Upgrade")
                assertThat(response.body).isInstanceOf<UnreadableResponseBody>()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        client =
          client.newBuilder()
            .addInterceptor(
              Interceptor { chain: Interceptor.Chain ->
                ready.countDown()
                try {
                  proceed.await(5, TimeUnit.SECONDS)
                } catch (e: InterruptedException) {
                  throw RuntimeException(e)
                }
                chain.proceed(chain.request())
              },
            )
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/CallConnectionUser.kt

    /**
     * A connection user that is a specific [RealCall].
     */
    internal class CallConnectionUser(
      private val call: RealCall,
      private val poolConnectionListener: ConnectionListener,
      private val chain: RealInterceptorChain,
    ) : ConnectionUser {
      private val eventListener: EventListener
        get() = call.eventListener
    
      override fun addPlanToCancel(connectPlan: ConnectPlan) {
        call.plansToCancel += connectPlan
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        client =
          client.newBuilder()
            .protocols(listOf(Protocol.H2_PRIOR_KNOWLEDGE))
            .socketFactory(socketFactory)
            .addNetworkInterceptor(
              Interceptor { chain ->
                try {
                  chain.proceed(chain.request())
                } finally {
                  firstConnectLatch.countDown()
                }
              },
            )
            .build()
    
        // Set up a same-connection retry.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        client =
          client.newBuilder()
            .addNetworkInterceptor(
              Interceptor { chain: Interceptor.Chain? ->
                val request =
                  chain!!.request().newBuilder()
                    .header("Host", "privateobject.com")
                    .build()
                chain.proceed(request)
              },
            )
            .build()
        server.enqueue(MockResponse())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CertificateChainCleanerTest.kt

        val cleaner = get(root)
        assertFailsWith<SSLPeerUnverifiedException> {
          cleaner.clean(certificates, "hostname")
        }
      }
    
      /** Returns a chain starting at the leaf certificate and progressing to the root.  */
      private fun chainOfLength(length: Int): List<HeldCertificate> {
        val result = mutableListOf<HeldCertificate>()
        for (i in 1..length) {
          result.add(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top