- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for bodyDelay (0.26 sec)
-
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
assertThat(it.body.string()).isEqualTo("abc") } } } } @Test fun timeoutCall() { runTest { server.enqueue( MockResponse.Builder() .bodyDelay(5, TimeUnit.SECONDS) .body("abc") .build(), ) val call = client.newCall(request) try { withTimeout(1.seconds) { call.executeAsync().use {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:24:38 UTC 2024 - 5.4K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt
result.inTunnel() KeepOpen } else -> wrapSocketPolicy() } result.throttleBody(throttleBytesPerPeriod, getThrottlePeriod(MILLISECONDS), MILLISECONDS) result.bodyDelay(getBodyDelay(MILLISECONDS), MILLISECONDS) result.headersDelay(getHeadersDelay(MILLISECONDS), MILLISECONDS) return result.build() } private fun PushPromise.wrap(): mockwebserver3.PushPromise {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
throttleBytesPerPeriod = mockResponse.throttleBytesPerPeriod var throttlePeriod: Long = mockResponse.getThrottlePeriod(TimeUnit.SECONDS) mockResponse = mockResponse.setBodyDelay(0L, TimeUnit.SECONDS) val bodyDelay: Long = mockResponse.getBodyDelay(TimeUnit.SECONDS) mockResponse = mockResponse.setHeadersDelay(0L, TimeUnit.SECONDS) val headersDelay: Long = mockResponse.getHeadersDelay(TimeUnit.SECONDS)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
@Test fun bodyReadTimeoutDoesNotStartUntilLastRequestBodyByteFire() { enableProtocol(Protocol.HTTP_2) server.enqueue( MockResponse.Builder() .bodyDelay(1500, TimeUnit.MILLISECONDS) .body("this should never be received") .build(), ) val request = Request.Builder() .url(server.url("/"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
dispatcher.enqueueResponse( MockResponse.Builder() .bodyDelay(10, TimeUnit.SECONDS) .body("abc") .build(), ) dispatcher.enqueueResponse( MockResponse.Builder() .bodyDelay(10, TimeUnit.SECONDS) .body("def") .build(), ) dispatcher.enqueueResponse(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 75.3K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
client = client.newBuilder() .callTimeout(250, TimeUnit.MILLISECONDS) .build() server.enqueue( MockResponse.Builder() .bodyDelay(500, TimeUnit.MILLISECONDS) .setHeader("content-type", "text/event-stream") .body("data: hey\n\n") .build(), ) val source = newEventSource()
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/EventListenerTest.kt
} @Test fun successfulChunkedHttpsCallEventSequence() { enableTlsWithTunnel() server.protocols = Arrays.asList(Protocol.HTTP_1_1) server.enqueue( MockResponse.Builder() .bodyDelay(100, TimeUnit.MILLISECONDS) .chunkedBody("Hello!", 2) .build(), ) assertSuccessfulEventOrder(anyResponse) assertBytesReadWritten( listener,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 56.9K bytes - Viewed (2) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
} /** * Set the delayed time of the response body to [delay]. This applies to the response body * only; response headers are not affected. */ fun bodyDelay( delay: Long, unit: TimeUnit, ) = apply { bodyDelayNanos = unit.toNanos(delay) } fun headersDelay( delay: Long, unit: TimeUnit, ) = apply {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt
.connectionPool(ConnectionPool(0, 5, TimeUnit.SECONDS)) .build() server.enqueue( MockResponse.Builder() .code(301) .addHeader("Location: /b") .bodyDelay(1, TimeUnit.SECONDS) .body("a") .build(), ) server.enqueue(MockResponse(body = "b")) val request = Request(server.url("/")) val response = client.newCall(request).execute()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K bytes - Viewed (0) -
mockwebserver/api/mockwebserver3.api
public final fun body (Lmockwebserver3/MockResponseBody;)Lmockwebserver3/MockResponse$Builder; public final fun body (Lokio/Buffer;)Lmockwebserver3/MockResponse$Builder; public final fun bodyDelay (JLjava/util/concurrent/TimeUnit;)Lmockwebserver3/MockResponse$Builder; public final fun build ()Lmockwebserver3/MockResponse; public final fun chunkedBody (Ljava/lang/String;I)Lmockwebserver3/MockResponse$Builder;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 03 21:59:45 UTC 2023 - 12.7K bytes - Viewed (0)