- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for throttleBody (0.07 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt
@Test fun interruptReadingResponseBody() { val responseBodySize = 8 * 1024 * 1024 // 8 MiB. server.enqueue( MockResponse() .setBody(Buffer().write(ByteArray(responseBodySize))) .throttleBody((64 * 1024).toLong(), 125, TimeUnit.MILLISECONDS), ) // 500 Kbps server.start() val call = client.newCall( Request .Builder() .url(server.url("/"))
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 18:33:48 UTC 2025 - 6.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/CancelTest.kt
val responseBodySize = 8 * 1024 * 1024 // 8 MiB. server.enqueue( MockResponse .Builder() .body( Buffer() .write(ByteArray(responseBodySize)), ).throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps .build(), ) val call = client.newCall(Request(server.url("/"))) val response = call.execute() cancelLater(call, 500)Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 9.4K bytes - Viewed (0) -
mockwebserver/README.md
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Oct 30 21:39:59 UTC 2025 - 8.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 16:11:23 UTC 2025 - 28.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
server.enqueue( MockResponse .Builder() .addHeader("h1", "v1") .trailers(headersOf("t1", "v2")) .body(protocol, halfResponseBody + halfResponseBody) .throttleBody( OKHTTP_CLIENT_WINDOW_SIZE.toLong(), DISCARD_STREAM_TIMEOUT_MILLIS.toLong() + 1L, TimeUnit.MILLISECONDS, ).build(), ) val call = client.newCall(Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Nov 08 21:45:04 UTC 2025 - 18.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
} } @Test fun failedDribbledCallEventSequence() { server.enqueue( MockResponse .Builder() .body("0123456789") .throttleBody(2, 100, TimeUnit.MILLISECONDS) .onResponseBody(CloseSocket()) .build(), ) client = client .newBuilder() .protocols(listOf<Protocol>(Protocol.HTTP_1_1))
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
mockResponse.socketPolicy = SocketPolicy.KEEP_OPEN var http2ErrorCode: Int = mockResponse.http2ErrorCode mockResponse.http2ErrorCode = 0 mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS) var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod throttleBytesPerPeriod = mockResponse.throttleBytesPerPeriodRegistered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt
val body = CharArray(4096) // 4KiB to read. Arrays.fill(body, 'y') server.enqueue( MockResponse .Builder() .body(String(body)) .throttleBody(1024, 1, TimeUnit.SECONDS) // Slow connection 1KiB/second. .build(), ) client = client .newBuilder() .readTimeout(Duration.ofSeconds(2)) .build()
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Nov 01 12:18:11 UTC 2025 - 67.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
} @Test fun timeoutsUpdatedOnReusedConnections() { server.enqueue(MockResponse(body = "abc")) server.enqueue( MockResponse .Builder() .body("def") .throttleBody(1, 750, TimeUnit.MILLISECONDS) .build(), ) // First request: time out after 1s. client = client .newBuilder() .readTimeout(Duration.ofSeconds(1))
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 147.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 17:41:45 UTC 2025 - 116.8K bytes - Viewed (0)