Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for OkHttpClient (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        } finally {
          cache.delete()
        }
      }
    
      private fun OkHttpClient.get(url: String) {
        val request = Request.Builder().url(url).build()
        val response = this.newCall(request).execute()
    
        response.use {
          assertEquals(200, response.code)
        }
      }
    
      fun buildCloudflareIp(bootstrapClient: OkHttpClient): DnsOverHttps {
        return DnsOverHttps.Builder().client(bootstrapClient)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

        message: String,
        stackTrace: Any?,
      ) {
        var logMessage = message
        if (stackTrace == null) {
          logMessage += " To see where this was allocated, set the OkHttpClient logger level to " +
            "FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);"
        }
        log(logMessage, WARN, stackTrace as Throwable?)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/CallHandshakeTest.kt

      private fun expectedConnectionCipherSuites(client: OkHttpClient): Set<String> {
        return client.connectionSpecs.first().cipherSuites!!.map { it.javaName }.intersect(defaultEnabledCipherSuites.toSet())
      }
    
      private fun makeClient(
        connectionSpec: ConnectionSpec? = null,
        tlsVersion: TlsVersion? = null,
        cipherSuites: List<CipherSuite>? = null,
      ): OkHttpClient {
        return this.client.newBuilder()
          .apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  7. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

    import java.net.UnknownHostException
    import java.util.concurrent.TimeUnit
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.Cache
    import okhttp3.Dns
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.testing.PlatformRule
    import okio.Buffer
    import okio.ByteString.Companion.decodeHex
    import okio.Path.Companion.toPath
    import okio.fakefilesystem.FakeFileSystem
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

    import okio.GzipSource
    
    /**
     * An OkHttp interceptor which logs request and response information. Can be applied as an
     * [application interceptor][OkHttpClient.interceptors] or as a [OkHttpClient.networkInterceptors].
     *
     * The format of the logs created by this class should not be considered stable and may
     * change slightly between releases. If you need a stable logging format, use your own interceptor.
     */
    class HttpLoggingInterceptor
      @JvmOverloads
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  9. CHANGELOG.md

    first. Fast fallback gives IPv6 connections a 250 ms head start so IPv6 is preferred on networks
    where it's available.
    
    To opt-in, configure your `OkHttpClient.Builder`:
    
    
    ```
    OkHttpClient client = new OkHttpClient.Builder()
        .fastFallback(true)
        .build();
    ```
    
     *  New: Change the build from Kotlin-JVM to Kotlin-multiplatform (which includes JVM). Both
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  10. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

    import okhttp3.CacheControl
    import okhttp3.Call
    import okhttp3.Callback
    import okhttp3.Dns
    import okhttp3.HttpUrl
    import okhttp3.MediaType
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.Response
    import okhttp3.internal.platform.Platform
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 9.8K bytes
    - Viewed (0)
Back to top