- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 181 for httpclient (0.66 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jan 01 15:55:32 UTC 2016 - 2K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.kt
import java.net.UnknownHostException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient /** * Temporary registry of known DNS over HTTPS providers. * * https://github.com/curl/curl/wiki/DNS-over-HTTPS */ object DohProviders { private fun buildGoogle(bootstrapClient: OkHttpClient): DnsOverHttps = DnsOverHttps .Builder() .client(bootstrapClient)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/ConfigureTimeouts.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.util.concurrent.TimeUnit import okhttp3.OkHttpClient import okhttp3.Request class ConfigureTimeouts { private val client: OkHttpClient = OkHttpClient .Builder() .connectTimeout(5, TimeUnit.SECONDS) .writeTimeout(5, TimeUnit.SECONDS) .readTimeout(5, TimeUnit.SECONDS)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CurrentDateHeader.java
package okhttp3.recipes; import java.io.IOException; import java.util.Date; import okhttp3.Headers; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class CurrentDateHeader { private final OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new CurrentDateInterceptor()) .build(); public void run() throws Exception {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Oct 31 15:32:50 UTC 2018 - 1.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostString.java
import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public final class PostString { 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 { String postBody = ""
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Authenticate.java
*/ package okhttp3.recipes; import java.io.IOException; import okhttp3.Credentials; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class Authenticate { private final OkHttpClient client; public Authenticate() { client = new OkHttpClient.Builder() .authenticator((route, response) -> { if (response.request().header("Authorization") != null) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addTrustedCertificate(localhostCertificate.certificate()) .build(); OkHttpClient client = new OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) .build(); Call call = client.newCall(new Request.Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java
import java.io.IOException; import okhttp3.Credentials; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class PreemptiveAuth { private final OkHttpClient client; public PreemptiveAuth() { client = new OkHttpClient.Builder() .addInterceptor( new BasicAuthInterceptor("publicobject.com", "jesse", "password1"))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Nov 05 07:46:46 UTC 2018 - 2.1K bytes - Viewed (0) -
samples/compare/build.gradle.kts
testImplementation(projects.mockwebserver3) testImplementation(projects.mockwebserver3Junit5) testImplementation(projects.okhttpTls) testImplementation(projects.okhttpTestingSupport) testImplementation(libs.httpClient5) testImplementation(libs.jettyClient) testImplementation(libs.junit) testImplementation(libs.assertk) } tasks.compileJava { options.isWarnings = false
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 473 bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceFactoryTest.java
public class EventSourceFactoryTest { @StartStop private final MockWebServer server = new MockWebServer(); @Test public void testEventSourceFactory() throws Exception { OkHttpClient client = new OkHttpClient(); EventSource.Factory factory = EventSource.Factory.create(client); server.enqueue( new MockResponse.Builder() .body("data: hello\n\n")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 2.8K bytes - Viewed (0)