- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 323 for Enqueue (0.09 sec)
-
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
} override fun writeTo(sink: BufferedSink) { sink.writeUtf8("<element/>") sink.flush() } } server.enqueue(MockResponse(code = 201)) server.enqueue(MockResponse(code = 204)) server.enqueue(MockResponse(code = 204)) val endpointUrl = server.url("/endpoint") var request = Request.Builder() .url(endpointUrl)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
.build() server.enqueue( MockResponse.Builder() .headersDelay(500, TimeUnit.MILLISECONDS) .setHeader("content-type", "text/event-stream") .body("data: hey\n\n") .build(), ) newEventSource() listener.assertFailure("timeout") } @Test fun retainsAccept() { server.enqueue( MockResponse.Builder() .body(
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/ConnectionListenerTest.kt
server!!.enqueue(MockResponse()) assertSuccessfulEventOrder() } @Test @Throws(IOException::class) fun multipleDnsLookupsForSingleCall() { server!!.enqueue( MockResponse( code = 301, headers = headersOf("Location", "http://www.fakeurl:" + server!!.port), ), ) server!!.enqueue(MockResponse()) val dns = FakeDns()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 9.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
@Test fun serverDisconnectsBeforeSecondRequestHttp1() { enableProtocol(Protocol.HTTP_1_1) server.enqueue(MockResponse(code = 200, body = "Req1")) server.enqueue(MockResponse(code = 200, body = "Req2")) val eventListener = object : EventListener() { var socket: SSLSocket? = null var closed = false
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
) { setUp(protocol, mockWebServer) server.enqueue( MockResponse.Builder() .body(Buffer().write(ByteArray(Http2Connection.OKHTTP_CLIENT_WINDOW_SIZE + 1))) .build(), ) server.enqueue( MockResponse(body = "abc"), ) // Enqueue an additional response that show if we burnt a good prior response. server.enqueue( MockResponse(body = "XXX"), )
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/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
server.enqueue(MockResponse()) val request = Request.Builder() .url(server.url("/")) .post(sleepingRequestBody(500)) .build() val latch = CountDownLatch(1) val exceptionRef = AtomicReference<Throwable>() val call = client.newCall(request) call.timeout().timeout(250, TimeUnit.MILLISECONDS) call.enqueue( object : Callback {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
} @Test fun receiveAndSendMultipleCookies() { server.enqueue( MockResponse.Builder() .addHeader("Set-Cookie", "a=android") .addHeader("Set-Cookie", "b=banana") .build(), ) server.enqueue(MockResponse()) val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER) client =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
.requestIOException() .exhaustResponse() server.enqueue( MockResponse.Builder() .clearHeaders() .code(HttpURLConnection.HTTP_MOVED_PERM) .addHeader("Location: /b") .streamHandler(body) .build(), ) server.enqueue( MockResponse.Builder() .body("this is /b") .build(), )
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/FastFallbackTest.kt
}, ) .build() // Set up a same-connection retry. serverIpv4.enqueue( MockResponse(socketPolicy = ResetStreamAtStart(ErrorCode.REFUSED_STREAM.httpCode)), ) serverIpv4.enqueue( MockResponse(body = "this was the 2nd request on IPv4"), ) serverIpv6.enqueue( MockResponse(body = "unexpected call to IPv6"), )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.3K bytes - Viewed (0) -
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
@Test fun suspendCall() { runTest { server.enqueue(MockResponse(body = "abc")) val call = client.newCall(request) call.executeAsync().use { withContext(Dispatchers.IO) { assertThat(it.body.string()).isEqualTo("abc") } } } } @Test fun timeoutCall() { runTest { server.enqueue( MockResponse.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:24:38 UTC 2024 - 5.4K bytes - Viewed (0)