- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for toURI (0.46 sec)
-
okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt
.isEqualTo(URI("http://host/a%C2%9Fb")) // Percent-encoded in the query. assertThat("http://host/?a\u0000b".toHttpUrl().toUri()) .isEqualTo(URI("http://host/?a%00b")) assertThat("http://host/?a\u0080b".toHttpUrl().toUri()) .isEqualTo(URI("http://host/?a%C2%80b")) assertThat("http://host/?a\u009fb".toHttpUrl().toUri()) .isEqualTo(URI("http://host/?a%C2%9Fb")) // Stripped from the fragment.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.9K bytes - Viewed (0) -
okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt
try { cookieHandler.put(url.toUri(), multimap) } catch (e: IOException) { Platform.get().log("Saving cookies failed for " + url.resolve("/...")!!, WARN, e) } } override fun loadForRequest(url: HttpUrl): List<Cookie> { val cookieHeaders = try { // The RI passes all headers. We don't have 'em, so we don't pass 'em! cookieHandler.get(url.toUri(), emptyMap<String, List<String>>())
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:10:43 GMT 2024 - 3.8K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt
} @Test fun get(server: MockWebServer) { server.enqueue( MockResponse.Builder() .body("hello, Apache HttpClient 5.x") .build(), ) val request = HttpGet(server.url("/").toUri()) request.addHeader("Accept", "text/plain") httpClient.execute(request).use { response -> assertThat(response.code).isEqualTo(200)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.1K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt
.build() server.enqueue( MockResponse.Builder() .body("hello, Java HTTP Client") .build(), ) val request = HttpRequest.newBuilder(server.url("/").toUri()) .header("Accept", "text/plain") .build() val response = httpClient.send(request, BodyHandlers.ofString()) assertThat(response.statusCode()).isEqualTo(200)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
if (failedRoute.proxy.type() != Proxy.Type.DIRECT) { val address = failedRoute.address address.proxySelector.connectFailed( address.url.toUri(), failedRoute.proxy.address(), failure, ) } client.routeDatabase.failed(failedRoute) } /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 15.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt
dns.assertRequests(uriHost) proxySelector.assertRequests(address.url.toUri()) } @Test fun proxySelectorReturnsMultipleProxies() { val address = factory.newAddress() proxySelector.proxies.add(proxyA) proxySelector.proxies.add(proxyB) val routeSelector = newRouteSelector(address) proxySelector.assertRequests(address.url.toUri()) // First try the IP addresses of the first proxy, in sequence.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Mar 06 17:33:38 GMT 2024 - 20.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
cookieA.domain = serverUrl.host cookieA.path = "/" cookieManager.cookieStore.add(serverUrl.toUri(), cookieA) val cookieB = HttpCookie("b", "banana") cookieB.domain = serverUrl.host cookieB.path = "/" cookieManager.cookieStore.add(serverUrl.toUri(), cookieB) client = client.newBuilder() .cookieJar(JavaNetCookieJar(cookieManager)) .build()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
| HttpUrl.get(URL) | URL.toHttpUrlOrNull() | | HttpUrl.parse(String) | String.toHttpUrlOrNull() | | HttpUrl.uri() | HttpUrl.toUri() | | HttpUrl.url() | HttpUrl.toUrl() | | MediaType.get(String) | String.toMediaType() |
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 16:58:16 GMT 2022 - 10.9K bytes - Viewed (0) -
okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt
fun storiesForCurrentDraft(): Array<String> { val resource = HpackJsonUtil::class.java.getResource("/hpack-test-case") ?: return arrayOf() val testCaseDirectory = File(resource.toURI()).toOkioPath() val result = mutableListOf<String>() for (path in fileSystem.list(testCaseDirectory)) { val story00 = path / "story_00.json" if (!fileSystem.exists(story00)) continue try {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.3K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/JettyHttpClientTest.kt
client.stop() } @Test fun get(server: MockWebServer) { server.enqueue(MockResponse(body = "hello, Jetty HTTP Client")) val request = client.newRequest(server.url("/").toUri()) .header("Accept", "text/plain") val response = request.send() assertThat(response.status).isEqualTo(200) assertThat(response.contentAsString).isEqualTo("hello, Jetty HTTP Client")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2K bytes - Viewed (0)