Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for withConnectTimeout (0.12 sec)

  1. okhttp/src/main/kotlin/okhttp3/Interceptor.kt

         * of network interceptors; for application interceptors this is always null.
         */
        fun connection(): Connection?
    
        fun call(): Call
    
        fun connectTimeoutMillis(): Int
    
        fun withConnectTimeout(
          timeout: Int,
          unit: TimeUnit,
        ): Chain
    
        fun readTimeoutMillis(): Int
    
        fun withReadTimeout(
          timeout: Int,
          unit: TimeUnit,
        ): Chain
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http/RealInterceptorChain.kt

        readTimeoutMillis,
        writeTimeoutMillis,
      )
    
      override fun connection(): Connection? = exchange?.connection
    
      override fun connectTimeoutMillis(): Int = connectTimeoutMillis
    
      override fun withConnectTimeout(
        timeout: Int,
        unit: TimeUnit,
      ): Interceptor.Chain {
        check(exchange == null) { "Timeouts can't be adjusted in a network interceptor" }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/InterceptorTest.kt

      }
    
      @Test
      fun connectTimeout() {
        val interceptor1 =
          Interceptor { chainA: Interceptor.Chain ->
            assertThat(chainA.connectTimeoutMillis()).isEqualTo(5000)
            val chainB = chainA.withConnectTimeout(100, TimeUnit.MILLISECONDS)
            assertThat(chainB.connectTimeoutMillis()).isEqualTo(100)
            chainB.proceed(chainA.request())
          }
        val interceptor2 =
          Interceptor { chain: Interceptor.Chain ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  4. docs/features/interceptors.md

     * Permitted to short-circuit and not call `Chain.proceed()`.
     * Permitted to retry and make multiple calls to `Chain.proceed()`.
     * Can adjust Call timeouts using withConnectTimeout, withReadTimeout, withWriteTimeout.
    
    **Network Interceptors**
    
     * Able to operate on intermediate responses like redirects and retries.
     * Not invoked for cached responses that short-circuit the network.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

          override fun connection(): Connection? = TODO()
    
          override fun call(): Call = TODO()
    
          override fun connectTimeoutMillis(): Int = TODO()
    
          override fun withConnectTimeout(
            timeout: Int,
            unit: TimeUnit,
          ): Interceptor.Chain = TODO()
    
          override fun readTimeoutMillis(): Int = TODO()
    
          override fun withReadTimeout(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  6. okhttp/api/okhttp.api

    	public abstract fun proceed (Lokhttp3/Request;)Lokhttp3/Response;
    	public abstract fun readTimeoutMillis ()I
    	public abstract fun request ()Lokhttp3/Request;
    	public abstract fun withConnectTimeout (ILjava/util/concurrent/TimeUnit;)Lokhttp3/Interceptor$Chain;
    	public abstract fun withReadTimeout (ILjava/util/concurrent/TimeUnit;)Lokhttp3/Interceptor$Chain;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
Back to top