- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 155 for okHttpClient (0.09 sec)
-
samples/guide/src/main/java/okhttp3/recipes/CancelCall.java
import java.util.concurrent.TimeUnit; import okhttp3.Call; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public class CancelCall { private final ScheduledExecutorService executor = Executors.newScheduledThreadPool(1); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 2.1K bytes - Viewed (0) -
samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java
static class Contributor { String login; int contributions; } public static void main(String... args) throws Exception { OkHttpClient client = new OkHttpClient(); // Create request for remote resource. Request request = new Request.Builder() .url(ENDPOINT) .build(); // Execute the request and retrieve the response.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 2.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java
import okhttp3.Cache; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class CacheResponse { private final OkHttpClient client; public CacheResponse(File cacheDirectory) throws Exception { int cacheSize = 10 * 1024 * 1024; // 10 MiB Cache cache = new Cache(cacheDirectory, cacheSize); client = new OkHttpClient.Builder() .cache(cache) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 2.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/internal.kt
import okhttp3.ConnectionPool import okhttp3.ConnectionSpec import okhttp3.Cookie import okhttp3.Headers import okhttp3.HttpUrl import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import okhttp3.internal.concurrent.TaskRunner import okhttp3.internal.connection.RealConnection internal fun parseCookie( currentTimeMillis: Long,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.7K bytes - Viewed (0) -
CHANGELOG.md
first. Fast fallback gives IPv6 connections a 250 ms head start so IPv6 is preferred on networks where it's available. To opt-in, configure your `OkHttpClient.Builder`: ``` OkHttpClient client = new OkHttpClient.Builder() .fastFallback(true) .build(); ``` * New: Change the build from Kotlin-JVM to Kotlin-multiplatform (which includes JVM). Both
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:31:39 UTC 2024 - 21.4K bytes - Viewed (0) -
okhttp-dnsoverhttps/README.md
```kotlin testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0") ``` ### Usage ``` val appCache = Cache(File("cacheDir", "okhttpcache"), 10 * 1024 * 1024) val bootstrapClient = OkHttpClient.Builder().cache(appCache).build() val dns = DnsOverHttps.Builder().client(bootstrapClient) .url("https://dns.google/dns-query".toHttpUrl())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 740 bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt
*/ package okhttp3.internal.http2 import java.io.IOException import java.net.ProtocolException import java.util.Locale import java.util.concurrent.TimeUnit import okhttp3.Headers import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.internal.headersContentLength import okhttp3.internal.http.ExchangeCodec import okhttp3.internal.http.ExchangeCodec.Carrier
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.9K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
import java.net.Socket import java.net.SocketException import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import okhttp3.DelegatingServerSocketFactory import okhttp3.DelegatingSocketFactory import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.RequestBody import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import okhttp3.testing.PlatformRule
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Progress.java
if (contentLength != -1) { System.out.format("%d%% done\n", (100 * bytesRead) / contentLength); } } } }; OkHttpClient client = new OkHttpClient.Builder() .addNetworkInterceptor(chain -> { Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 3.9K bytes - Viewed (0)