Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for callTimeout (0.06 sec)

  1. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

        assertThat(client.minWebSocketMessageToCompress).isEqualTo(1024)
      }
    
      @Test fun timeoutValidRange() {
        val builder = OkHttpClient.Builder()
        try {
          builder.callTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
          builder.connectTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

      }
    
      @Test
      fun configureClientDefault() {
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val timeoutClient =
          client.newBuilder()
            .callTimeout(Duration.ofMillis(456))
            .build()
        val call = timeoutClient.newCall(request)
        assertThat(call.timeout().timeoutNanos())
          .isEqualTo(TimeUnit.MILLISECONDS.toNanos(456))
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

          )
        serverIpv4.shutdown()
        serverIpv6.enqueue(
          MockResponse(body = "hello from IPv6"),
        )
    
        client =
          client.newBuilder()
            .fastFallback(false)
            .callTimeout(1_000, TimeUnit.MILLISECONDS)
            .build()
        val call = client.newCall(Request(url))
        assertFailsWith<IOException> {
          call.execute()
        }.also { expected ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

            .writeTimeout(Duration.ZERO)
            .callTimeout(Duration.ofMillis(100))
            .build()
        newWebSocket()
        clientListener.assertFailure(InterruptedIOException::class.java, "timeout")
      }
    
      @Test
      @Throws(Exception::class)
      fun callTimeoutDoesNotApplyOnceConnected() {
        client =
          client.newBuilder()
            .callTimeout(Duration.ofMillis(100))
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun okHttpClientBuilder() {
        var builder: OkHttpClient.Builder = OkHttpClient.Builder()
        builder = builder.callTimeout(0L, TimeUnit.SECONDS)
        builder = builder.callTimeout(Duration.ofSeconds(0L))
        builder = builder.connectTimeout(0L, TimeUnit.SECONDS)
        builder = builder.connectTimeout(Duration.ofSeconds(0L))
    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. CHANGELOG.md

        other engines on other platforms. [Ktor] does this pretty well today!
    
     *  Breaking: Use `kotlin.time.Duration` in APIs like `OkHttpClient.Builder.callTimeout()`. This
        update also drops support for the `DurationUnit` functions introduced in earlier alpha releases
        of OkHttp 5.
    
     *  Breaking: Reorder the parameters in the Cache constructor that was introduced in 5.0.0-alpha.3.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 18 01:31:39 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  7. docs/recipes.md

          private val client: OkHttpClient = OkHttpClient.Builder()
              .connectTimeout(5, TimeUnit.SECONDS)
              .writeTimeout(5, TimeUnit.SECONDS)
              .readTimeout(5, TimeUnit.SECONDS)
              .callTimeout(10, TimeUnit.SECONDS)
              .build()
    
          fun run() {
            val request = Request.Builder()
                .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
                .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
Back to top