Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 347 for if (0.12 sec)

  1. android-test/src/androidTest/java/okhttp/android/test/sni/SniOverrideTest.kt

        class CustomSSLSocketFactory(
          delegate: SSLSocketFactory,
        ) : DelegatingSSLSocketFactory(delegate) {
          override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
              val parameters = sslSocket.sslParameters
              val sni = parameters.serverNames
              Log.d("CustomSSLSocketFactory", "old SNI: $sni")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/MockWebServerExtension.kt

        private val servers = mutableMapOf<String, MockWebServer>()
        private var started = false
    
        fun server(name: String): MockWebServer {
          return servers.getOrPut(name) {
            MockWebServer().also {
              if (started) it.start()
            }
          }
        }
    
        fun startAll() {
          started = true
          for (server in servers.values) {
            server.start()
          }
        }
    
        fun shutdownAll() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 11 12:12:36 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

        platform.assumeNotConscrypt()
        val tlsFallbackScsv = "TLS_FALLBACK_SCSV"
        val supportedCiphers = listOf(*handshakeCertificates.sslSocketFactory().supportedCipherSuites)
        if (!supportedCiphers.contains(tlsFallbackScsv)) {
          // This only works if the client socket supports TLS_FALLBACK_SCSV.
          return
        }
        server.useHttps(handshakeCertificates.sslSocketFactory())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CallHandshakeTest.kt

        return this.client.newBuilder()
          .apply {
            if (connectionSpec != null) {
              connectionSpecs(
                listOf(
                  ConnectionSpec.Builder(connectionSpec)
                    .apply {
                      if (tlsVersion != null) {
                        tlsVersions(tlsVersion)
                      }
                      if (cipherSuites != null) {
    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)
  5. okhttp/src/test/java/okhttp3/CacheControlJvmTest.kt

            .onlyIfCached()
            .noTransform()
            .immutable()
            .build()
        assertThat(cacheControl.toString()).isEqualTo(
          "no-cache, no-store, max-age=1, max-stale=2, min-fresh=3, only-if-cached, " +
            "no-transform, immutable",
        )
        assertThat(cacheControl.noCache).isTrue()
        assertThat(cacheControl.noStore).isTrue()
        assertThat(cacheControl.maxAgeSeconds).isEqualTo(1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        assertThat(source.readLong()).isEqualTo(upstreamSize)
        assertThat(source.readLong()).isEqualTo(metadataSize.toLong())
        if (upstream != null) {
          assertThat(source.readUtf8(upstreamSize)).isEqualTo(upstream)
        }
        if (metadata != null) {
          assertThat(source.readByteString(metadataSize.toLong())).isEqualTo(metadata)
        }
        source.close()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java

            .addTrustedCertificate(letsEncryptCertificateAuthority)
            .addTrustedCertificate(entrustRootCertificateAuthority)
            .addTrustedCertificate(comodoRsaCertificationAuthority)
            // Uncomment if standard certificates are also required.
            //.addPlatformTrustedCertificates()
            .build();
    
        client = new OkHttpClient.Builder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 9.3K bytes
    - Viewed (2)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/SynchronousGet.kt

      fun run() {
        val request =
          Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          for ((name, value) in response.headers) {
            println("$name: $value")
          }
    
          println(response.body.string())
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt

          @Throws(IOException::class)
          override fun read(
            sink: Buffer,
            byteCount: Long,
          ): Long {
            val buffer = Buffer()
            val read = delegate.read(buffer, byteCount)
            if (read != -1L) {
              sink.write(buffer.readByteString().toAsciiUppercase())
            }
            return read
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/FailedPlan.kt

     *    to use `H2_PRIOR_KNOWLEDGE` but the URL's scheme is `https:`.
     *  * Preemptive proxy authentication failed.
     *
     * Planning failures are not necessarily fatal. For example, even if we can't DNS lookup the first
     * proxy in a list, looking up a subsequent one may succeed.
     */
    internal class FailedPlan(e: Throwable) : RoutePlanner.Plan {
      val result = RoutePlanner.ConnectResult(plan = this, throwable = e)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (1)
Back to top