- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 153 for newCall (0.05 sec)
-
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
if (hostnameCount.getAndIncrement() >= hostLimit) return; Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { String responseSource = response.networkResponse() != null ? ("(network: " + response.networkResponse().code() + " over " + response.protocol()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jul 23 00:58:06 UTC 2025 - 5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt
showUrl("https://squareup.com/robots.txt") showUrl("https://publicobject.com/helloworld.txt") } private fun showUrl(url: String) { val request = Builder().url(url).build() client .newCall(request) .execute() .use { response -> if (!response.isSuccessful) { val responseHeaders = response.headers for (i in 0 until responseHeaders.size) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 8.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallHandshakeTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 11.2K bytes - Viewed (0) -
okhttp-tls/README.md
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) .build(); // Connect 'em all together. Certificates are exchanged in the handshake. Call call = client.newCall(new Request.Builder() .url(server.url("/")) .build()); Response response = call.execute(); System.out.println(response.handshake().peerPrincipal()); RecordedRequest recordedRequest = server.takeRequest();
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 9.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt
server2.useHttps(handshakeCertificates.sslSocketFactory()) } private fun executeSynchronously(request: Request): RecordedResponse { val call = client.newCall(request) return try { val response = call.execute() val bodyString = response.body.string() RecordedResponse(request, response, null, bodyString, null) } catch (e: IOException) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 11.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 10.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt
* [EventListener] instance will be used during the lifecycle of [call]. * * This method is invoked after [call] is created. See [OkHttpClient.newCall]. * * **It is an error for implementations to issue any mutating operations on the [call] instance * from this method.** */ fun create(call: Call): EventListener }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 17.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CookiesTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 13K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/CertificatePinner.kt
* OkHttpClient client = OkHttpClient.Builder() * .certificatePinner(certificatePinner) * .build(); * * Request request = new Request.Builder() * .url("https://" + hostname) * .build(); * client.newCall(request).execute(); * ``` * * As expected, this fails with a certificate pinning exception: * * ```java * javax.net.ssl.SSLPeerUnverifiedException: Certificate pinning failure! * Peer certificate chain:
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 14.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
server.enqueue(mockResponse2.build()) val call1 = client.newCall(newRequest("/")) val response1 = call1.execute() val in1 = response1.body.byteStream() assertThat(readAscii(in1, 5)).isEqualTo("ABCDE") in1.close() call1.cancel() val call2 = client.newCall(newRequest("/")) val response2 = call2.execute() val in2 = response2.body.byteStream()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0)