- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 108 for okHttpClient (0.08 sec)
-
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 { return DnsOverHttps.Builder() .client(bootstrapClient)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Dec 23 10:26:25 UTC 2023 - 3.8K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java
*/ @RunWith(AndroidJUnit4.class) public class IssueReproductionTest { @Test public void getFailsWithoutAdditionalCert() throws IOException { OkHttpClient client = new OkHttpClient(); sendRequest(client, "https://google.com/robots.txt"); } private void sendRequest(OkHttpClient client, String url) throws IOException { Request request = new Request.Builder() .url(url) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jul 26 06:37:08 UTC 2021 - 1.9K bytes - Viewed (0) -
okhttp-tls/README.md
Entrust and Verisign. This is the behavior you'll get with your OkHttpClient if you don't specifically configure `HandshakeCertificates`. Or you can do it explicitly with `addPlatformTrustedCertificates()`: ```java HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .build(); OkHttpClient client = new OkHttpClient.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 9.1K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java
* for background. */ @RunWith(AndroidJUnit4.class) public class LetsEncryptTest { @Test public void getFailsWithoutAdditionalCert() throws IOException { OkHttpClient client = new OkHttpClient(); boolean androidMorEarlier = Build.VERSION.SDK_INT <= 23; try { sendRequest(client, "https://valid-isrgrootx1.letsencrypt.org/robots.txt"); if (androidMorEarlier) { fail();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Nov 17 07:40:31 UTC 2020 - 6.1K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliTestMain.kt
*/ package okhttp3.brotli import okhttp3.OkHttpClient import okhttp3.Request fun main() { val client = OkHttpClient.Builder() .addInterceptor(BrotliInterceptor) .build() sendRequest("https://httpbin.org/brotli", client) sendRequest("https://httpbin.org/gzip", client) } private fun sendRequest( url: String, client: OkHttpClient, ) { val req = Request.Builder().url(url).build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.1K bytes - Viewed (0) -
okhttp-urlconnection/src/main/kotlin/okhttp3/JavaNetAuthenticator.kt
package okhttp3 import java.io.IOException import okhttp3.Authenticator.Companion.JAVA_NET_AUTHENTICATOR /** * Do not use this. * * Instead, configure your OkHttpClient.Builder to use `Authenticator.JAVA_NET_AUTHENTICATOR`: * * ``` * val okHttpClient = OkHttpClient.Builder() * .authenticator(okhttp3.Authenticator.Companion.JAVA_NET_AUTHENTICATOR) * .build() * ``` */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/guide/GetExample.java
* limitations under the License. */ package okhttp3.guide; import java.io.IOException; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public class GetExample { final OkHttpClient client = new OkHttpClient(); String run(String url) throws IOException { Request request = new Request.Builder() .url(url) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java
package okhttp3.recipes; import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.WebSocket; import okhttp3.WebSocketListener; import okio.ByteString; public final class WebSocketEcho extends WebSocketListener { private void run() { OkHttpClient client = new OkHttpClient.Builder() .readTimeout(0, TimeUnit.MILLISECONDS) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 04 11:40:21 UTC 2024 - 1.6K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java
* https://square.github.io/okhttp/ */ @RunWith(AndroidJUnit4.class) public class OkHttpClientTest { @Test public void get() throws IOException { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://google.com/robots.txt") .build(); try (Response response = client.newCall(request).execute()) { assertEquals(200, response.code());
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Nov 14 17:38:22 UTC 2020 - 1.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PerCallSettings.java
*/ package okhttp3.recipes; import java.io.IOException; import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class PerCallSettings { 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: Sun May 22 01:29:42 UTC 2016 - 1.9K bytes - Viewed (0)