Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 128 for OkHttpClient (0.19 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  2. 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() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  3. 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();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  4. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

          builder.eventListenerFactory(LoggingEventListener.Factory(logger))
        }
        return builder.build()
      }
    
      fun close() {
        val okHttpClient = client as OkHttpClient
        okHttpClient.connectionPool.evictAll() // Close any persistent connections.
        okHttpClient.dispatcher.executorService.shutdownNow()
      }
    
      companion object {
        internal const val NAME = "okcurl"
        internal const val DEFAULT_TIMEOUT = -1
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (1)
  5. 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)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 23 10:26:25 GMT 2023
    - 3.8K bytes
    - Viewed (3)
  6. 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  7. 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()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 02 14:04:37 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  8. docs/features/https.md

    By default, OkHttp will attempt a `MODERN_TLS` connection.  However by configuring the client connectionSpecs you can allow a fall back to `COMPATIBLE_TLS` connection if the modern configuration fails.
    
    ```java
    OkHttpClient client = new OkHttpClient.Builder()
        .connectionSpecs(Arrays.asList(ConnectionSpec.MODERN_TLS, ConnectionSpec.COMPATIBLE_TLS))
        .build();
    ```
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 24 00:16:30 GMT 2022
    - 10.5K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

     * exceptions.
     *
     * Use [newClient] as a factory for a OkHttpClient instances. These instances are specifically
     * configured for testing.
     */
    class OkHttpClientTestRule : BeforeEachCallback, AfterEachCallback {
      private val clientEventsList = mutableListOf<String>()
      private var testClient: OkHttpClient? = null
      private var uncaughtException: Throwable? = null
      private lateinit var testName: String
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (3)
Back to top