- Sort Score
- Num 10 results
- Language All
Results 1 - 8 of 8 for throttleBody (0.09 seconds)
-
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(Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 18.8K bytes - Click Count (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))
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 70.7K bytes - Click Count (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()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 67.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
assertThat(getResponse(Request(url)).code).isEqualTo(407) } @Test fun disconnectedConnection() { server.enqueue( MockResponse .Builder() .throttleBody(2, 100, TimeUnit.MILLISECONDS) .body("ABCD") .build(), ) val call = client.newCall(newRequest("/")) val response = call.execute() val inputStream = response.body.byteStream()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 133.3K bytes - Click Count (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt
result.onResponseStart(SocketEffect.Stall) } SocketPolicy.RESET_STREAM_AT_START -> { result.onRequestStart(CloseStream(http2ErrorCode)) } } result.throttleBody(throttleBytesPerPeriod, getThrottlePeriod(MILLISECONDS), MILLISECONDS) result.bodyDelay(getBodyDelay(MILLISECONDS), MILLISECONDS) result.headersDelay(getHeadersDelay(MILLISECONDS), MILLISECONDS) return result.build()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 4.3K bytes - Click Count (1) -
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))
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:02:18 GMT 2026 - 146.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Mar 20 09:13:37 GMT 2026 - 121K bytes - Click Count (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.throttleBytesPerPeriodCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 49.7K bytes - Click Count (0)