- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for setBodyDelay (0.15 sec)
-
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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
throttlePeriodAmount = period throttlePeriodUnit = unit } fun getThrottlePeriod(unit: TimeUnit): Long = unit.convert(throttlePeriodAmount, throttlePeriodUnit) fun setBodyDelay( delay: Long, unit: TimeUnit, ) = apply { bodyDelayAmount = delay bodyDelayUnit = unit } fun getBodyDelay(unit: TimeUnit): Long = unit.convert(bodyDelayAmount, bodyDelayUnit)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
mockwebserver-deprecated/api/mockwebserver.api
public final fun setBody (Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse; public final fun setBody (Lokio/Buffer;)Lokhttp3/mockwebserver/MockResponse; public final fun setBodyDelay (JLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/MockResponse; public final fun setChunkedBody (Ljava/lang/String;I)Lokhttp3/mockwebserver/MockResponse;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 22 12:28:51 UTC 2023 - 10.2K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
} /** Delay the response body by sleeping 1s. */ @Test fun delayResponse() { assumeNotWindows() server.enqueue( MockResponse() .setBody("ABCDEF") .setBodyDelay(1, TimeUnit.SECONDS), ) val startNanos = System.nanoTime() val connection = server.url("/").toUrl().openConnection() val inputStream = connection.getInputStream()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0)