Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 155 for okHttpClient (0.7 sec)

  1. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

          this.fastFallback = okHttpClient.fastFallback
          this.authenticator = okHttpClient.authenticator
          this.followRedirects = okHttpClient.followRedirects
          this.followSslRedirects = okHttpClient.followSslRedirects
          this.cookieJar = okHttpClient.cookieJar
          this.cache = okHttpClient.cache
          this.dns = okHttpClient.dns
          this.proxy = okHttpClient.proxy
          this.proxySelector = okHttpClient.proxySelector
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 06 04:21:33 UTC 2024
    - 52K bytes
    - Viewed (0)
  2. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Dec 23 10:26:25 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

          )
        }
      }
    
      @Test fun testH2PriorKnowledgeOkHttpClientConstructionSuccess() {
        val okHttpClient =
          OkHttpClient.Builder()
            .protocols(listOf(Protocol.H2_PRIOR_KNOWLEDGE))
            .build()
        assertThat(okHttpClient.protocols.size).isEqualTo(1)
        assertThat(okHttpClient.protocols[0]).isEqualTo(Protocol.H2_PRIOR_KNOWLEDGE)
      }
    
      @Test fun nullDefaultProxySelector() {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  4. docs/recipes.md

        ```java
          private final OkHttpClient client = new OkHttpClient();
    
          public void run() throws Exception {
            Request request = new Request.Builder()
                .url("http://httpbin.org/delay/1") // This URL is served with a 1 second delay.
                .build();
    
            // Copy to customize OkHttp for this request.
            OkHttpClient client1 = client.newBuilder()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
  5. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Tue Nov 17 07:40:31 UTC 2020
    - 6.1K bytes
    - Viewed (0)
  6. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.9K bytes
    - Viewed (0)
  7. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jul 26 06:37:08 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  8. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  9. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Thu Apr 04 11:40:21 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top