- Sort Score
- Result 10 results
- Languages All
Results 211 - 220 of 705 for REQUEST (0.05 sec)
-
regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java
assertTrue(androidMorEarlier); } } private void sendRequest(OkHttpClient client, String url) throws IOException { Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { assertTrue(response.code() == 200 || response.code() == 404); assertEquals(Protocol.HTTP_2, response.protocol()); } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Nov 17 07:40:31 UTC 2020 - 6.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/AutobahnTester.kt
val client = OkHttpClient() private fun newWebSocket( path: String, listener: WebSocketListener, ): WebSocket { val request = Request .Builder() .url(HOST + path) .build() return client.newWebSocket(request, listener) } fun run() { try { val count = getTestCount() println("Test count: $count") for (number in 1..count) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.6K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Callback.kt
*/ package okhttp3 import okio.IOException interface Callback { /** * Called when the request could not be executed due to cancellation, a connectivity problem or * timeout. Because networks can fail during an exchange, it is possible that the remote server * accepted the request before the failure. */ fun onFailure( call: Call, e: IOException, ) /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
* limitations under the License. */ package okhttp3.recipes; import java.net.InetAddress; import okhttp3.Call; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.tls.HandshakeCertificates; import okhttp3.tls.HeldCertificate; /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
okhttp/api/android/okhttp.api
public fun build ()Lokhttp3/Request; public fun cacheControl (Lokhttp3/CacheControl;)Lokhttp3/Request$Builder; public final fun cacheUrlOverride (Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder; public final fun delete ()Lokhttp3/Request$Builder; public fun delete (Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt
handshakeCertificates.trustManager, ) } val client = clientBuilder.build() val request = Request .Builder() .url("https://valid-isrgrootx1.letsencrypt.org/robots.txt") .build() client.newCall(request).execute().use { response -> assertThat(response.code).isEqualTo(404) assertThat(response.protocol).isEqualTo(Protocol.HTTP_2) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.4K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/RecordedRequestFactory.kt
val parts = when { requestLine != null -> requestLine.split(' ', limit = 3) else -> return DEFAULT_REQUEST_LINE_HTTP_1 } if (parts.size != 3) { throw ProtocolException("unexpected request line: $requestLine") } return RequestLine( method = parts[0], target = parts[1], version = parts[2], ) } internal class RequestLine( val method: String, val target: String,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 12:43:16 UTC 2025 - 3.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/CookieJar.kt
* cookies. */ fun saveFromResponse( url: HttpUrl, cookies: List<Cookie>, ) /** * Load cookies from the jar for an HTTP request to [url]. This method returns a possibly * empty list of cookies for the network request. * * Simple implementations will return the accepted cookies that have not yet expired and that * [match][Cookie.matches] [url]. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ExternalHttp2Example.kt
import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.Request object ExternalHttp2Example { @JvmStatic fun main(args: Array<String>) { val client = OkHttpClient .Builder() .protocols(listOf(Protocol.HTTP_2, Protocol.HTTP_1_1)) .build() val call = client.newCall( Request .Builder() .url("https://www.google.ca/")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.4K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicLoomTest.kt
mockServerClient .`when`( request() .withPath("/person") .withQueryStringParameter("name", "peter"), ).respond(response().withBody("Peter the person!")) val results = (1..20).map { executor.submit { val response = client.newCall(Request((mockServer.secureEndpoint + "/person?name=peter").toHttpUrl())).execute()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.7K bytes - Viewed (1)