Search Options

Results per page
Sort
Preferred Languages
Advance

Results 531 - 540 of 567 for fun (0.01 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/ErrorCode.kt

      CANCEL(8),
    
      COMPRESSION_ERROR(9),
    
      CONNECT_ERROR(0xa),
    
      ENHANCE_YOUR_CALM(0xb),
    
      INADEQUATE_SECURITY(0xc),
    
      HTTP_1_1_REQUIRED(0xd),
      ;
    
      companion object {
        fun fromHttp2(code: Int): ErrorCode? = values().find { it.httpCode == code }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  2. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/PlatformRegistry.kt

        }
    
      private val isBouncyCastlePreferred: Boolean
        get() {
          val preferredProvider = Security.getProviders()[0].name
          return "BC" == preferredProvider
        }
    
      actual fun findPlatform(): Platform {
        if (isConscryptPreferred) {
          val conscrypt = ConscryptPlatform.buildIfSupported()
    
          if (conscrypt != null) {
            return conscrypt
          }
        }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu May 22 14:39:30 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RetryTlsHandshake.kt

    import javax.net.ssl.SSLException
    import javax.net.ssl.SSLHandshakeException
    import javax.net.ssl.SSLPeerUnverifiedException
    import okio.IOException
    
    /** Returns true if a TLS connection should be retried after [e]. */
    fun retryTlsHandshake(e: IOException): Boolean =
      when {
        // If there was a protocol problem, don't recover.
        e is ProtocolException -> false
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt

      private val delegate: Sink,
      private val bytesPerPeriod: Long,
      private val periodDelayNanos: Long,
    ) : Sink by delegate {
      private var bytesWrittenSinceLastDelay = 0L
    
      override fun write(
        source: Buffer,
        byteCount: Long,
      ) {
        var bytesLeft = byteCount
    
        while (bytesLeft > 0) {
          if (bytesWrittenSinceLastDelay == bytesPerPeriod) {
            flush()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 12:43:16 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  5. .teamcity/src/main/kotlin/configurations/DocsTest.kt

    import jetbrains.buildServer.configs.kotlin.Project
    import jetbrains.buildServer.configs.kotlin.buildFeatures.parallelTests
    import model.CIBuildModel
    import model.Stage
    
    fun asDocsTestId(
        model: CIBuildModel,
        os: Os,
    ): String = "${model.projectId}_DocsTest_${os.asName()}"
    
    class DocsTestProject(
        model: CIBuildModel,
        stage: Stage,
        val os: Os,
    Registered: Wed Sep 10 11:36:15 UTC 2025
    - Last Modified: Tue Jun 17 10:05:07 UTC 2025
    - 3K bytes
    - Viewed (0)
  6. samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt

     * OkHttp.
     *
     * https://square.github.io/okhttp/
     */
    class OkHttpClientTest {
      @JvmField @RegisterExtension
      val platform = PlatformRule()
    
      @StartStop
      private val server = MockWebServer()
    
      @Test fun get() {
        server.enqueue(MockResponse(body = "hello, OkHttp"))
    
        val client = OkHttpClient()
    
        val request =
          Request
            .Builder()
            .url(server.url("/"))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  7. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

     */
    class JavaHttpClientTest {
      @JvmField @RegisterExtension
      val platform = PlatformRule()
    
      @StartStop
      private val server = MockWebServer()
    
      @Test fun get() {
        // Not available
        platform.expectFailureOnJdkVersion(8)
    
        val httpClient =
          HttpClient
            .newBuilder()
            .followRedirects(NORMAL)
            .build()
    
        server.enqueue(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  8. mockwebserver/README.md

      assertEquals("/v1/chat/messages/3", request3.getUrl().encodedPath());
    
      // Shut down the server. Instances cannot be reused.
      server.close();
    }
    ```
    
    ### Kotlin
    ```kotlin
    fun test() {
      // Create a MockWebServer. These are lean enough that you can create a new
      // instance for every unit test.
      val server = MockWebServer()
    
      // Schedule some responses.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jul 19 13:40:52 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  9. okcurl/src/main/kotlin/okhttp3/curl/logging/OneLineLogFormat.kt

          .appendValue(SECOND_OF_MINUTE, 2)
          .optionalStart()
          .appendFraction(NANO_OF_SECOND, 3, 3, true)
          .toFormatter()
    
      private val offset = ZoneOffset.systemDefault()
    
      override fun format(record: LogRecord): String {
        val message = formatMessage(record)
    
        val time = Instant.ofEpochMilli(record.millis).atZone(offset)
    
        return if (record.thrown != null) {
          val sw = StringWriter(4096)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 2.1K bytes
    - Viewed (1)
  10. android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt

    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
        // Raised https://github.com/mannodermaus/android-junit5/issues/228 to reevaluate
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.4K bytes
    - Viewed (0)
Back to top