- Sort Score
- Result 10 results
- Languages All
Results 391 - 400 of 625 for val3 (0.02 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt
println("Challenges: ${response.challenges()}") val credential = Credentials.basic("jesse", "password1") return response.request .newBuilder() .header("Authorization", credential) .build() } }, ).build() fun run() { val request = Request .Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/sni/SniOverrideTest.kt
) : DelegatingSSLSocketFactory(delegate) { override fun configureSocket(sslSocket: SSLSocket): SSLSocket { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { val parameters = sslSocket.sslParameters val sni = parameters.serverNames Log.d("CustomSSLSocketFactory", "old SNI: $sni") parameters.serverNames = mutableListOf<SNIServerName>(SNIHostName("cloudflare-dns.com"))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.6K bytes - Viewed (0) -
mockwebserver/README.md
// instance for every unit test. val server = MockWebServer() // Schedule some responses. server.enqueue(MockResponse(body = "hello, world!")) server.enqueue(MockResponse(body = "sup, bra?")) server.enqueue(MockResponse(body = "yo dog")) // Start the server. server.start() // Ask the server for its URL. You'll need this to make HTTP requests. val baseUrl = server.url("/v1/chat/")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jul 19 13:40:52 UTC 2025 - 8.1K bytes - Viewed (0) -
android-test/src/test/kotlin/okhttp/android/test/BaseOkHttpClientUnitTest.kt
.build() } @Test fun testRequestExternal() { assumeNetwork() val request = Request("https://www.google.com/robots.txt".toHttpUrl()) val networkRequest = request .newBuilder() .build() val call = client.newCall(networkRequest) call.execute().use { response -> assertThat(response.code).isEqualTo(200)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 22 20:03:31 UTC 2025 - 2.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt
import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.asRequestBody class PostMultipart { private val client = OkHttpClient() fun run() { // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image val requestBody = MultipartBody .Builder() .setType(MultipartBody.FORM) .addFormDataPart("title", "Square Logo")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.1K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsRecordCodecTest.kt
@Test fun testGoogleDotComEncoding() { val encoded = encodeQuery("google.com", TYPE_A) assertThat(encoded).isEqualTo("AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ") } private fun encodeQuery( host: String, type: Int, ): String = DnsRecordCodec.encodeQuery(host, type).base64Url().replace("=", "") @Test fun testGoogleDotComEncodingWithIPv6() { val encoded = encodeQuery("google.com", TYPE_AAAA)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu May 29 20:09:10 UTC 2025 - 3.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt
/** * An override to ignore the normal order that is enforced. * EventListeners added by Interceptors will not see all events. */ private val enforceOrder: Boolean = true, ) : ConnectionListener() { val eventSequence: Deque<ConnectionEvent> = ConcurrentLinkedDeque() private val forbiddenLocks = mutableSetOf<Any>() /** The timestamp of the last taken event, used to measure elapsed time between events. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 5.7K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/AndroidPlatform.kt
* index trusted CA certificates. */ internal data class CustomTrustRootIndex( private val trustManager: X509TrustManager, private val findByIssuerAndSignatureMethod: Method, ) : TrustRootIndex { override fun findByIssuerAndSignature(cert: X509Certificate): X509Certificate? = try { val trustAnchor = findByIssuerAndSignatureMethod.invoke( trustManager, cert,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu May 29 16:52:38 UTC 2025 - 6.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RoutePlanner.kt
* (success), just an exception (permanent failure), or just a plan (non-exceptional retry). */ data class ConnectResult( val plan: Plan, val nextPlan: Plan? = null, val throwable: Throwable? = null, ) { val isSuccess: Boolean get() = nextPlan == null && throwable == null }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 4.2K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt
* to observing Firefox or Chrome browser behaviour. */ class ApacheHttpClientHttp2Test { @Test fun testHttp2() { val client = HttpAsyncClients.createHttp2Default() client.use { client -> client.start() val request = SimpleHttpRequests.get("https://google.com/robots.txt") val response = client.execute(request, LoggingCallback).get() println("Protocol ${response.version}")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0)