- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 22 for requestsCount (0.14 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
assertThat(cache.requestCount()).isEqualTo(1) assertThat(cache.networkCount()).isEqualTo(1) assertThat(cache.hitCount()).isEqualTo(0) assertThat(get(server.url("/")).body.string()).isEqualTo("B") assertThat(get(server.url("/")).body.string()).isEqualTo("C") assertThat(cache.requestCount()).isEqualTo(3) assertThat(cache.networkCount()).isEqualTo(3)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 113.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
cache.flush() cache.close() val directory: File = cache.directory val networkCount: Int = cache.networkCount() val hitCount: Int = cache.hitCount() val requestCount: Int = cache.requestCount() } @Test fun cacheControl() { val cacheControl: CacheControl = CacheControl.Builder().build() val noCache: Boolean = cacheControl.noCache
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt
server.dispatcher = object : Dispatcher() { var requestCount = 0 override fun dispatch(request: RecordedRequest): MockResponse { val result = queueDispatcher.dispatch(request) requestCount++ if (requestCount == 1) { // Before handling call1's CONNECT we do all of call2. This part re-entrant! try {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 73.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt
), ) assertFailsWith<IOException> { callA.execute() }.also { expected -> assertThat(expected).hasMessage("boom") } assertThat(server.requestCount).isEqualTo(0) // Confirm that the connection pool was not corrupted by making another call. This doesn't use // makeSimpleCall() because it uses the MockResponse enqueued above.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 9.4K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
queryParameterNames, querySize, scheme, username * **MockResponse**: headers, http2ErrorCode, socketPolicy, status, trailers * **MockWebServer**: bodyLimit, port, protocolNegotiationEnabled, protocols, requestCount, serverSocketFactory * **MultipartBody.Part**: body, headers * **MultipartBody.**: boundary, parts, size, type * **OkHttpClient**: authenticator, cache, callTimeoutMillis, certificatePinner,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt
mockWebServer.setBodyLimit(0L) mockWebServer.setProtocolNegotiationEnabled(false) mockWebServer.setProtocols(listOf(Protocol.HTTP_1_1)) var requestCount: Int = mockWebServer.getRequestCount() } @Test @Disabled fun multipartBody() { val multipartBody: MultipartBody = MultipartBody.Builder().build() val type: MediaType = multipartBody.type()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
// of recording is non-deterministic. val requestAfter = server.takeRequest() assertThat( requestAfter.exchangeIndex == 0 || server.requestCount == 3 && server.takeRequest().exchangeIndex == 0, ).isTrue() } internal enum class WriteKind { BYTE_BY_BYTE, SMALL_BUFFERS, LARGE_BUFFERS, } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
assertNotNull(it.cacheResponse) assertNull(it.networkResponse) } assertEquals(1, cache.hitCount()) assertEquals(1, cache.networkCount()) assertEquals(2, cache.requestCount()) } finally { cache.delete() } } private fun OkHttpClient.get(url: String) { val request = Request.Builder().url(url).build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 14:12:28 UTC 2025 - 29K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
val response = client.newCall(request).execute() assertThat(response.code).isEqualTo(408) assertThat(response.body.string()).isEqualTo("You took too long!") assertThat(server.requestCount).isEqualTo(2) } @Test fun maxUnavailableTimeoutRetries() { server.enqueue( MockResponse .Builder() .code(503) .addHeader("Connection", "Close")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 146.6K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
/** * The number of HTTP requests received thus far by this server. This may exceed the number of * HTTP connections when connection reuse is in practice. */ public val requestCount: Int get() = atomicRequestCount.get() /** The number of bytes of the POST body to keep in memory to the given limit. */ public var bodyLimit: Long = Long.MAX_VALUE
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 20:36:00 UTC 2025 - 40.3K bytes - Viewed (0)