- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for callTimeout (0.08 sec)
-
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
builder.connectTimeout(connectTimeout.toLong(), SECONDS) } if (readTimeout != DEFAULT_TIMEOUT) { builder.readTimeout(readTimeout.toLong(), SECONDS) } if (callTimeout != DEFAULT_TIMEOUT) { builder.callTimeout(callTimeout.toLong(), SECONDS) } if (allowInsecure) { val trustManager = createInsecureTrustManager() val sslSocketFactory = createInsecureSslSocketFactory(trustManager)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Call.kt
* body, server processing, and reading the response body. If the call requires redirects or * retries all must complete within one timeout period. * * Configure the client's default timeout with [OkHttpClient.Builder.callTimeout]. */ fun timeout(): Timeout /** * Create a new, identical call to this one which can be enqueued or executed even if this call * has already been. */ public override fun clone(): Call
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 3.6K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
.build(), ) newEventSource() listener.assertFailure(null) } @Test fun fullCallTimeoutDoesNotApplyOnceConnected() { client = client.newBuilder() .callTimeout(250, TimeUnit.MILLISECONDS) .build() server.enqueue( MockResponse.Builder() .bodyDelay(500, TimeUnit.MILLISECONDS) .setHeader("content-type", "text/event-stream")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 6.6K bytes - Viewed (0) -
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) -
samples/guide/src/main/java/okhttp3/recipes/kt/ConfigureTimeouts.kt
class ConfigureTimeouts { 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: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
* all must complete within one timeout period. * * The default value is 0 which imposes no timeout. */ fun callTimeout( timeout: Long, unit: TimeUnit, ) = apply { callTimeout = checkDuration("timeout", timeout, unit) } /** * Sets the default timeout for complete calls. A value of 0 means no timeout, otherwise values
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:21:33 UTC 2024 - 52K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocketChannelTest.kt
assumeTrue((socketMode.provider == CONSCRYPT) == platform.isConscrypt()) } val client = clientTestRule.newClientBuilder() .dns { listOf(InetAddress.getByName("localhost")) } .callTimeout(4, SECONDS) .writeTimeout(2, SECONDS) .readTimeout(2, SECONDS) .apply { if (socketMode is TlsInstance) { if (socketMode.socketMode == Channel) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8K bytes - Viewed (0) -
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) -
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) -
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)