- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 47 for period (0.22 sec)
-
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
Request((mockServer.secureEndpoint + "/person?name=peter").toHttpUrl()), ).execute() assertThat(response.body.string()).contains("Peter the person") assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1) } } @Test fun testUrlConnectionDirect() { testRequest { val url = URI(mockServer.endpoint + "/person?name=peter").toURL()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 5.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
// Treating this use case as user error server.protocols = listOf(Protocol.H2_PRIOR_KNOWLEDGE, Protocol.H2_PRIOR_KNOWLEDGE) fail<Any>() } catch (expected: IllegalArgumentException) { assertThat(expected.message).isEqualTo( "protocols containing h2_prior_knowledge cannot use other protocols: " + "[h2_prior_knowledge, h2_prior_knowledge]", ) } } @Test
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 21.9K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java
server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE)); server.enqueue(new MockResponse().setBody("hello")); server.start(); OkHttpClient client = new OkHttpClient.Builder() .socketFactory(new UnixDomainSocketFactory(socketFile)) .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE)) .build(); Request request = new Request.Builder()
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Dec 24 03:46:30 GMT 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/FailedPlan.kt
/** * Used when we were unsuccessful in the planning phase of a connection: * * * A DNS lookup failed * * The configuration is incapable of carrying the request, such as when the client is configured * to use `H2_PRIOR_KNOWLEDGE` but the URL's scheme is `https:`. * * Preemptive proxy authentication failed. * * Planning failures are not necessarily fatal. For example, even if we can't DNS lookup the first
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt
user.secureConnectEnd(handshake) } else { socket = rawSocket protocol = when { Protocol.H2_PRIOR_KNOWLEDGE in route.address.protocols -> Protocol.H2_PRIOR_KNOWLEDGE else -> Protocol.HTTP_1_1 } } val connection = RealConnection( taskRunner = taskRunner,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 18.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt
.sslSocketFactory(sslContext.socketFactory, trustManager) .build() // An example test URL that returns client certificate details. val request = Request.Builder() .url("https://prod.idrix.eu/secure/") .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") println(response.body.string()) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.2K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/Response.kt
level = DeprecationLevel.ERROR, ) fun receivedResponseAtMillis(): Long = receivedResponseAtMillis /** * Closes the response body. Equivalent to `body().close()`. * * Prior to OkHttp 5.0, it was an error to close a response that is not eligible for a body. This * includes the responses returned from [cacheResponse], [networkResponse], and [priorResponse]. */
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 15.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
.protocols(listOf(Protocol.H2_PRIOR_KNOWLEDGE)) .build() server.useHttps(handshakeCertificates.sslSocketFactory()) server.enqueue(MockResponse()) val call = client.newCall(Request(server.url("/"))) assertFailsWith<UnknownServiceException> { call.execute() }.also { expected -> assertThat(expected.message).isEqualTo("H2_PRIOR_KNOWLEDGE cannot be used with HTTPS") }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt
.`when`( request().withPath("/person") .withQueryStringParameter("name", "peter"), ) .respond(response().withBody("Peter the person!")) val response = client.newCall(Request((mockServer.endpoint + "/person?name=peter").toHttpUrl())).execute() assertThat(response.body.string()).contains("Peter the person") } } @Test fun testHttpsRequest() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 3.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FastFallbackTest.kt
dnsResults = listOf( localhostIpv4, localhostIpv6, TestUtil.UNREACHABLE_ADDRESS_IPV4.address, ) serverIpv4.protocols = listOf(Protocol.H2_PRIOR_KNOWLEDGE) serverIpv6.protocols = listOf(Protocol.H2_PRIOR_KNOWLEDGE) // Yield the first IP address so the second IP address completes first. val firstConnectLatch = CountDownLatch(1) val socketFactory =
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.3K bytes - Viewed (0)