- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 75 for newBuilder (0.06 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt
.newBuilder() .protocols(listOf(Protocol.HTTP_1_1)) .build() .routeDatabase, ) assertNotSame( client.routeDatabase, client .newBuilder() .connectionSpecs(listOf(ConnectionSpec.COMPATIBLE_TLS)) .build() .routeDatabase, ) assertNotSame( client.routeDatabase, client .newBuilder()Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 13.4K bytes - Click Count (1) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 16:11:23 GMT 2025 - 28.2K bytes - Click Count (0) -
android-test/src/androidDeviceTest/java/okhttp/android/test/OkHttpTest.kt
@Test fun testDnsOverHttps() { assumeNetwork() client = client .newBuilder() .eventListenerFactory(clientTestRule.wrap(LoggingEventListener.Factory())) .build() val dohDns = buildCloudflareIp(client) val dohEnabledClient = client .newBuilder() .eventListener(EventListener.NONE) .dns(dohDns) .build()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 29.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt
val request = Request(server.url("/")) assertConnectionNotReused(request, request) } @Test fun connectionsAreNotReusedIfPoolIsSizeZero() { client = client .newBuilder() .connectionPool(ConnectionPool(0, 5, TimeUnit.SECONDS)) .build() server.enqueue(MockResponse(body = "a")) server.enqueue(MockResponse(body = "b")) val request = Request(server.url("/"))
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 12.3K bytes - Click Count (1) -
okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt
enableTls() client = client .newBuilder() .protocols(listOf(protocol, Protocol.HTTP_1_1)) .build() server1.protocols = client.protocols server2.protocols = client.protocols } private fun enableTls() { client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(),
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jan 10 15:25:06 GMT 2026 - 11.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CookiesTest.kt
private var client = clientTestRule.newClient() @Test fun testNetscapeResponse() { val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER) client = client .newBuilder() .cookieJar(JavaNetCookieJar(cookieManager)) .build() val urlWithIpAddress = urlWithIpAddress(server, "/path/foo") server.enqueue( MockResponse .Builder() .addHeader(
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Mar 19 07:46:39 GMT 2026 - 14.5K bytes - Click Count (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt
// 4. successful stale cached GET response // 5. unsuccessful response @Test fun usesCache() { val cache = Cache(cacheFs, "cache".toPath(), (100 * 1024).toLong()) val cachedClient = bootstrapClient.newBuilder().cache(cache).build() val cachedDns = buildLocalhost(cachedClient, false) repeat(2) { server.enqueue( dnsResponse(
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 11.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt
val differentDnsUrl = url.newBuilder().host("differentdns.com").build() assertFailsWith<IOException> { execute(differentDnsUrl) } } @Test fun skipsOnRedirectWhenDnsDontMatch() { server.enqueue( MockResponse .Builder() .code(301) .addHeader("Location", url.newBuilder().host("differentdns.com").build()) .build(), )
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Jun 19 11:44:16 GMT 2025 - 19.1K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt
) } @Test fun webSocketAndApplicationInterceptors() { val interceptedCount = AtomicInteger() client = client .newBuilder() .addInterceptor( Interceptor { chain: Interceptor.Chain -> assertThat(chain.request().body).isNull() val response = chain.proceed(chain.request())
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 35.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
chain.eventListener.satisfactionFailure(call, it) } } // If we don't need the network, we're done. if (networkRequest == null) { return cacheResponse!! .newBuilder() .cacheResponse(cacheResponse.stripBody()) .build() .also { chain.eventListener.cacheHit(call, it) } } if (cacheResponse != null) {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Jan 11 12:06:21 GMT 2026 - 10.3K bytes - Click Count (0)