- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 323 for Enqueue (0.14 sec)
-
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
}, ) .build() } @AfterEach fun tearDown() { Thread.interrupted() // Clear interrupted state. } @Test fun interruptWritingRequestBody() { server.enqueue(MockResponse()) server.start() val call = client.newCall( Request.Builder() .url(server.url("/")) .post( object : RequestBody() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt
val client = buildClient(clientCert, clientIntermediateCa.certificate) val socketFactory = buildServerSslSocketFactory() server.useHttps(socketFactory) server.requestClientAuth() server.enqueue( MockResponse.Builder() .body("abc") .build(), ) val call = client.newCall(Request.Builder().url(server.url("/")).build()) val response = call.execute()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 12.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
server.useHttps(handshakeCertificates.sslSocketFactory()) server.enqueue( MockResponse( headers = headersOf( "Last-Modified", formatDate(-1, TimeUnit.HOURS)!!, "Expires", formatDate(1, TimeUnit.HOURS)!!, ), body = "ABC.1", ), ) server.enqueue( MockResponse( headers = headersOf(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocketChannelTest.kt
server.useHttps(serverSslSocketFactory) } else if (socketMode == Channel) { socketFactory(ChannelSocketFactory()) } } .build() server.enqueue(MockResponse(body = "abc")) @Suppress("HttpUrlsUsage") val url = if (socketMode is TlsInstance) { "https://$hostname:${server.port}/get" } else {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt
@BeforeEach fun before(server: MockWebServer) { this.server = server } @AfterEach fun after() { listener.assertExhausted() } @Test fun processResponse() { server.enqueue( MockResponse.Builder() .body( """ |data: hey | | """.trimMargin(), ).setHeader("content-type", "text/event-stream") .build(),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 2.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Dispatcher.kt
if (existingCall.host == host) return existingCall } return null } /** * Cancel all calls currently enqueued or executing. Includes calls executed both * [synchronously][Call.execute] and [asynchronously][Call.enqueue]. */ fun cancelAll() { this.withLock { for (call in readyAsyncCalls) { call.call.cancel() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jun 20 14:10:53 UTC 2024 - 9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DispatcherCleanupTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.2K bytes - Viewed (0) -
android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt
super.onCreate(savedInstanceState) val client = OkHttpClient() val url = "https://github.com/square/okhttp".toHttpUrl() println(url.topPrivateDomain()) client.newCall(Request(url)).enqueue( object : Callback { override fun onFailure( call: Call, e: IOException, ) { println("failed: $e") } override fun onResponse(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
.heldCertificate(localhostCertificate) .build(); MockWebServer server = new MockWebServer(); server.useHttps(serverCertificates.sslSocketFactory(), false); server.enqueue(new MockResponse()); HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addTrustedCertificate(localhostCertificate.certificate()) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt
private val client = OkHttpClient() fun run() { val request = Request.Builder() .url("http://publicobject.com/helloworld.txt") .build() client.newCall(request).enqueue( object : Callback { override fun onFailure( call: Call, e: IOException, ) { e.printStackTrace() } override fun onResponse(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0)