- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 162 for okHttpClient (0.07 sec)
-
docs/features/https.md
By default, OkHttp will attempt a `MODERN_TLS` connection. However by configuring the client connectionSpecs you can allow a fall back to `COMPATIBLE_TLS` connection if the modern configuration fails. ```java OkHttpClient client = new OkHttpClient.Builder() .connectionSpecs(Arrays.asList(ConnectionSpec.MODERN_TLS, ConnectionSpec.COMPATIBLE_TLS)) .build(); ```
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Dec 24 00:16:30 UTC 2022 - 10.5K bytes - Viewed (0) -
docs/features/caching.md
pragmatic caching behaviour, following common real-world browser like Firefox/Chrome and server behaviour when ambiguous. # Basic Usage ```kotlin private val client: OkHttpClient = OkHttpClient.Builder() .cache(Cache( directory = File(application.cacheDir, "http_cache"), // $0.05 worth of phone storage in 2020 maxSize = 50L * 1024L * 1024L // 50 MiB ))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 3.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
import java.io.IOException import java.net.ProtocolException import java.util.concurrent.TimeUnit.MILLISECONDS import okhttp3.Headers import okhttp3.Headers.Companion.headersOf import okhttp3.HttpUrl import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import okhttp3.internal.checkOffsetAndCount import okhttp3.internal.connection.BufferedSocket import okhttp3.internal.discard import okhttp3.internal.headersContentLength
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 17.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt
import kotlin.time.Duration import okhttp3.Dispatcher import okhttp3.EventListener import okhttp3.Headers import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.defaultPort import okhttp3.OkHttpClient import okhttp3.Response import okhttp3.internal.http2.Header import okio.Buffer import okio.BufferedSource import okio.Source /** GMT and UTC are equivalent for our purposes. */ @JvmField
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 10.2K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
builder.eventListenerFactory(LoggingEventListener.Factory(logger)) } return builder.build() } fun close() { val okHttpClient = client as OkHttpClient okHttpClient.connectionPool.evictAll() // Close any persistent connections. okHttpClient.dispatcher.executorService.shutdownNow() } companion object { internal const val NAME = "okcurl" internal const val DEFAULT_TIMEOUT = -1
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java
package okhttp3.recipes; import java.io.IOException; import java.security.cert.Certificate; import okhttp3.CertificatePinner; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class CertificatePinning { private final OkHttpClient client = new OkHttpClient.Builder() .certificatePinner( new CertificatePinner.Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Dec 08 21:30:01 UTC 2019 - 1.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DispatcherCleanupTest.kt
import mockwebserver3.junit5.StartStop import org.junit.jupiter.api.Test class DispatcherCleanupTest { @StartStop private val server = MockWebServer() @Test fun testFinish() { val okhttp = OkHttpClient() val callback = object : Callback { override fun onFailure( call: Call, e: IOException, ) {} override fun onResponse( call: Call,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java
* limitations under the License. */ package okhttp3.recipes; import java.io.IOException; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class AccessHeaders { private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java
import java.io.IOException; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Headers; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; public final class AsynchronousGet { private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/ParseResponseWithMoshi.java
import com.squareup.moshi.JsonAdapter; import com.squareup.moshi.Moshi; import java.io.IOException; import java.util.Map; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class ParseResponseWithMoshi { private final OkHttpClient client = new OkHttpClient(); private final Moshi moshi = new Moshi.Builder().build(); private final JsonAdapter<Gist> gistJsonAdapter = moshi.adapter(Gist.class);
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.8K bytes - Viewed (0)