- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 144 for newBuilder (0.12 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/SessionReuseTest.kt
sslSocket.apply { if (reuseSession) { this.enableSessionCreation = false } } } client = client .newBuilder() .connectionSpecs(listOf(spec)) .eventListenerFactory( clientTestRule.wrap( object : EventListener() { override fun connectionAcquired(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6K bytes - Viewed (1) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestCommonTest.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: Wed Mar 19 19:25:20 UTC 2025 - 10.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt
* [newBuilder]. * * @suppress this method breaks Dokka! https://github.com/Kotlin/dokka/issues/2473 */ fun tag(): Any? = tag<Any>() /** * Returns the tag attached with [type] as a key, or null if no tag is attached with that * key. */ fun <T> tag(type: Class<out T>): T? = tag(type.kotlin) fun newBuilder(): Builder = Builder(this) /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 13.1K bytes - Viewed (1) -
okhttp/src/jvmTest/kotlin/okhttp3/JSSETest.kt
) } } @Test @Disabled fun testFacebook() { val sessionIds = mutableListOf<String>() assumeNetwork() client = client .newBuilder() .eventListenerFactory( clientTestRule.wrap( object : EventListener() { override fun connectionAcquired( call: Call,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 5.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Progress.java
} }; OkHttpClient client = new OkHttpClient.Builder() .addNetworkInterceptor(chain -> { Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) .build(); }) .build(); try (Response response = client.newCall(request).execute()) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 3.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
newRoutePlanner = false continue } // Clear out downstream interceptor's additional request headers, cookies, etc. response = response .newBuilder() .request(request) .priorResponse(priorResponse?.stripBody()) .build() val exchange = call.interceptorScopedExchange
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 12.4K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt
val uppercaseBody: ResponseBody = object : ForwardingResponseBody(response.body) { override fun source(): BufferedSource = uppercaseSource(delegate().source()).buffer() } return response .newBuilder() .body(uppercaseBody) .build() } private fun uppercaseSource(source: BufferedSource): ForwardingSource { return object : ForwardingSource(source) { @Throws(IOException::class)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
val header = when (response.code) { 407 -> "Proxy-Authorization" else -> "Authorization" } return response.request .newBuilder() .addHeader(header, credential) .build() } private fun schemeMatches(response: Response): Boolean { if (scheme == null) return true
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt
HandshakeCertificates .Builder() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ).build() server.useHttps(handshakeCertificates.sslSocketFactory()) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 3.7K bytes - Viewed (0)