- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 144 for newBuilder (0.05 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
} @Test fun newBuilderUrlResetsUrl() { val requestWithoutCache = Request.Builder().url("http://localhost/api").build() val builtRequestWithoutCache = requestWithoutCache.newBuilder().url("http://localhost/api/foo").build() assertThat(builtRequestWithoutCache.url).isEqualTo( "http://localhost/api/foo".toHttpUrl(), ) val requestWithCache = Request .Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 19K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Nov 05 07:46:46 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheCorruptionTest.kt
"Expires", formatDate(1, TimeUnit.HOURS)!!, ), body = "ABC.2", ), ) client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ).hostnameVerifier(nullHostnameVerifier) .build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt
} return sslSocket } } var client = OkHttpClient() @Test fun getWithCustomSocketFactory() { client = client .newBuilder() .sslSocketFactory(CustomSSLSocketFactory(client.sslSocketFactory), client.x509TrustManager!!) .connectionSpecs( listOf( ConnectionSpec
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.8K bytes - Viewed (0) -
docs/recipes.md
All the HTTP client configuration lives in `OkHttpClient` including proxy settings, timeouts, and caches. When you need to change the configuration of a single call, call `OkHttpClient.newBuilder()`. This returns a builder that shares the same connection pool, dispatcher, and configuration with the original client. In the example below, we make one request with a 500 ms timeout and another with a 3000 ms timeout.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K bytes - Viewed (0) -
guava/src/com/google/common/eventbus/SubscriberRegistry.java
* created and objects of the same class are registered on all of them. */ private static final LoadingCache<Class<?>, ImmutableList<Method>> subscriberMethodsCache = CacheBuilder.newBuilder() .weakKeys() .build(CacheLoader.from(SubscriberRegistry::getAnnotatedMethodsNotCached)); /** * Returns all subscribers for the given listener grouped by the type of event they subscribe to.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 10.8K bytes - Viewed (0) -
docs/features/interceptors.md
if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { return chain.proceed(originalRequest); } Request compressedRequest = originalRequest.newBuilder() .header("Content-Encoding", "gzip") .method(originalRequest.method(), gzip(originalRequest.body())) .build(); return chain.proceed(compressedRequest); }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 8.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DispatcherTest.kt
.containsExactlyInAnyOrder(a4, a5) } @Test fun synchronousCallAccessors() { val ready = CountDownLatch(2) val waiting = CountDownLatch(1) client = client .newBuilder() .addInterceptor( Interceptor { chain: Interceptor.Chain? -> try { ready.countDown() waiting.await() } catch (e: InterruptedException) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 12.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 3.1K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
// power of (1/concentration) and floor()ed max = Ints.checkedCast((long) Math.pow(distinctKeys, concentration)); cache = CacheBuilder.newBuilder() .concurrencyLevel(segments) .maximumSize(maximumSize) .build( new CacheLoader<Integer, Integer>() { @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3.4K bytes - Viewed (0)