- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 205 for httpclient (0.14 sec)
-
samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java
import java.io.IOException; import java.util.logging.Logger; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class LoggingInterceptors { private static final Logger logger = Logger.getLogger(LoggingInterceptors.class.getName()); private final OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new LoggingInterceptor()) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jan 01 15:55:32 UTC 2016 - 2K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
import assertk.assertions.isEqualTo import java.net.HttpURLConnection import java.net.Proxy import java.net.URI import javax.net.ssl.HttpsURLConnection import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.Request import okhttp3.containers.BasicMockServerTest.Companion.MOCKSERVER_IMAGE import okhttp3.containers.BasicMockServerTest.Companion.trustMockServer import okio.buffer
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 5.9K bytes - Viewed (0) -
samples/tlssurvey/src/main/kotlin/okhttp3/survey/Iana.kt
} ?: throw IllegalArgumentException("No such suite: $javaName") } } suspend fun fetchIanaSuites(okHttpClient: OkHttpClient): IanaSuites { val url = "https://www.iana.org/assignments/tls-parameters/tls-parameters-4.csv" val call = okHttpClient.newCall(Request(url.toHttpUrl())) val suites = call.executeAsync().use { if (!it.isSuccessful) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:24:38 UTC 2024 - 2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java
*/ package okhttp3.recipes; import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class ConfigureTimeouts { private final OkHttpClient client; public ConfigureTimeouts() throws Exception { client = new OkHttpClient.Builder() .connectTimeout(5, TimeUnit.SECONDS) .writeTimeout(5, TimeUnit.SECONDS)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Sep 28 18:00:26 UTC 2019 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/SynchronousGet.java
* limitations under the License. */ package okhttp3.recipes; import java.io.IOException; import okhttp3.Headers; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class SynchronousGet { private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder() .url("https://publicobject.com/helloworld.txt")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.5K bytes - Viewed (0) -
okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt
@Config( sdk = [30], ) class RobolectricOkHttpClientTest { private lateinit var context: Context private lateinit var client: OkHttpClient @Before fun setUp() { context = ApplicationProvider.getApplicationContext<Application>() client = OkHttpClient.Builder() .cache(Cache(FakeFileSystem(), "/cache".toPath(), 10_000_000)) .build() } @Test fun testRequestExternal() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 2.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java
.header("Cache-Control", "max-age=60") .build(); }; private final OkHttpClient client; public RewriteResponseCacheControl(File cacheDirectory) throws Exception { Cache cache = new Cache(cacheDirectory, 1024 * 1024); cache.evictAll(); client = new OkHttpClient.Builder() .cache(cache) .build(); } public void run() throws Exception {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 2.6K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt
} } companion object { val MOCKSERVER_IMAGE: DockerImageName = DockerImageName .parse("mockserver/mockserver") .withTag("mockserver-5.15.0") fun OkHttpClient.Builder.trustMockServer(): OkHttpClient.Builder = apply { val keyStoreFactory = KeyStoreFactory(Configuration.configuration(), MockServerLogger()) val socketFactory = keyStoreFactory.sslContext().socketFactory
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 3.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okio.BufferedSink; public final class PostStreaming { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 2.1K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
import okhttp3.HttpUrl; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; /** * Fetches HTML from a requested URL, follows the links, and repeats. */ public final class Crawler { private final OkHttpClient client;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 4.6K bytes - Viewed (0)