Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for Let (0.12 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

              // Request body headers are only present when installed as a network interceptor. When not
              // already present, force them to be included (if available) so their values are known.
              requestBody.contentType()?.let {
                if (headers["Content-Type"] == null) {
                  logger.log("Content-Type: $it")
                }
              }
              if (requestBody.contentLength() != -1L) {
    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)
  2. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

      return request.build()
    }
    
    private fun Main.mediaType(): MediaType? {
      val mimeType =
        headers?.let {
          for (header in it) {
            val parts = header.split(':', limit = 2)
            if ("Content-Type".equals(parts[0], ignoreCase = true)) {
              return@let parts[1].trim()
            }
          }
          return@let null
        } ?: "application/x-www-form-urlencoded"
    
      return mimeType.toMediaTypeOrNull()
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt

        eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m
        0vdXcDazv/wor3ElhVsT/h5/WrQ8
        -----END CERTIFICATE-----
        """.trimIndent().decodeCertificatePem()
    
      // CN=Let's Encrypt Authority X3, O=Let's Encrypt, C=US
      val letsEncryptCertificateAuthority =
        """
        -----BEGIN CERTIFICATE-----
        MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.8K bytes
    - Viewed (5)
  4. native-image-tests/src/main/kotlin/okhttp3/DotListener.kt

        System.setErr(object : PrintStream(OutputStream.nullOutputStream()) {})
      }
    
      fun uninstall() {
        originalSystemOut.let {
          System.setOut(it)
        }
        originalSystemErr.let {
          System.setErr(it)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-HeadersCommon.kt

          "Unexpected char 0x${c.charCode()} at $i in $name value" +
            (if (isSensitiveHeader(name)) "" else ": $value")
        }
      }
    }
    
    private fun Char.charCode() =
      code.toString(16).let {
        if (it.length < 2) {
          "0$it"
        } else {
          it
        }
      }
    
    internal fun commonHeadersOf(vararg inputNamesAndValues: String): Headers {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  6. regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java

    import org.junit.runner.RunWith;
    import javax.net.ssl.SSLHandshakeException;
    
    import static org.junit.Assert.assertEquals;
    import static org.junit.Assert.assertTrue;
    import static org.junit.Assert.fail;
    
    /**
     * Let's Encrypt expiring root test.
     *
     * Read https://community.letsencrypt.org/t/mobile-client-workarounds-for-isrg-issue/137807
     * for background.
     */
    @RunWith(AndroidJUnit4.class)
    public class LetsEncryptTest {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Nov 17 07:40:31 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  7. android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt

    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.tls.HandshakeCertificates
    import okhttp3.tls.decodeCertificatePem
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    
    /**
     * Test for new Let's Encrypt Root Certificate.
     */
    @Tag("Remote")
    class LetsEncryptClientTest {
      @Test fun get() {
        // These tests wont actually run before Android 8.0 as per
        // https://github.com/mannodermaus/android-junit5
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (1)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

              val coordinatorTask = waitingCoordinatorTask ?: error("no coordinator waiting")
              currentTask = coordinatorTask
              taskRunner.condition.signalAll()
            }
          }
    
        // Let the coordinator process its interruption.
        runTasks()
      }
    
      /** Ask a single task to proceed. Used by the test thread only. */
      fun runNextTask() {
        taskRunner.assertThreadDoesntHoldLock()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

      internal val fileSystem: FileSystem =
        object : ForwardingFileSystem(fileSystem) {
          override fun sink(
            file: Path,
            mustCreate: Boolean,
          ): Sink {
            file.parent?.let {
              createDirectories(it)
            }
            return super.sink(file, mustCreate)
          }
        }
    
      /** The maximum number of bytes that this cache should use to store its data. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

      @Synchronized private fun initUncaughtException(throwable: Throwable) {
        if (uncaughtException == null) {
          uncaughtException = throwable
        }
      }
    
      fun ensureAllConnectionsReleased() {
        testClient?.let {
          val connectionPool = it.connectionPool
    
          connectionPool.evictAll()
          if (connectionPool.connectionCount() > 0) {
            // Minimise test flakiness due to possible race conditions with connections closing.
    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)
Back to top