Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 223 for protocol (0.03 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Protocol.kt

            HTTP_1_0.protocol -> HTTP_1_0
            HTTP_1_1.protocol -> HTTP_1_1
            H2_PRIOR_KNOWLEDGE.protocol -> H2_PRIOR_KNOWLEDGE
            HTTP_2.protocol -> HTTP_2
            SPDY_3.protocol -> SPDY_3
            QUIC.protocol -> QUIC
            else -> {
              // Support HTTP3 draft like h3-29
              if (protocol.startsWith(HTTP_3.protocol)) HTTP_3 else throw IOException("Unexpected protocol: $protocol")
            }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jun 23 18:58:57 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt

          }
        }
      }
    
      private fun MockResponse.Builder.body(
        protocol: Protocol,
        body: String,
      ) = apply {
        when (protocol) {
          Protocol.HTTP_1_1 -> chunkedBody(body, 1024) // Force multiple chunks.
          else -> body(body)
        }
      }
    
      private fun enableProtocol(protocol: Protocol) {
        if (protocol == Protocol.HTTP_2) {
          enableTls()
          client =
            client
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 18:57:05 UTC 2025
    - 18K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt

          OkHttpClient
            .Builder()
            .protocols(protocols as List<Protocol>)
        }.also { expected ->
          assertThat(expected.message).isEqualTo("protocols must not contain null")
        }
      }
    
      @Test fun spdy3IsRemovedFromProtocols() {
        val protocols =
          mutableListOf(
            Protocol.HTTP_1_1,
            Protocol.SPDY_3,
          )
        val client =
          OkHttpClient
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

        enableTlsWithTunnel()
        server.protocols = Arrays.asList(Protocol.HTTP_1_1)
        responseBodyFail(Protocol.HTTP_1_1)
      }
    
      @Test
      fun responseBodyFailHttp2OverHttps() {
        platform.assumeHttp2Support()
        enableTlsWithTunnel()
        server.protocols = Arrays.asList(Protocol.HTTP_2, Protocol.HTTP_1_1)
        responseBodyFail(Protocol.HTTP_2)
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 60.4K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            connectTls(sslSocket, connectionSpec)
            user.secureConnectEnd(handshake)
          } else {
            javaNetSocket = rawSocket
            protocol =
              when {
                Protocol.H2_PRIOR_KNOWLEDGE in route.address.protocols -> Protocol.H2_PRIOR_KNOWLEDGE
                else -> Protocol.HTTP_1_1
              }
          }
    
          val connection =
            RealConnection(
              taskRunner = taskRunner,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val i = HttpLoggingInterceptor()
    
        builder.interceptors().add(i)
        builder.networkInterceptors().add(i)
      }
    
      @Test
      fun protocol() {
        var protocol: Protocol = Protocol.HTTP_2
        protocol = Protocol.get("")
      }
    
      @Test
      fun pushPromise() {
        val pushPromise: PushPromise = PushPromise("", "", headersOf(), MockResponse())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  7. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

            // Pick the first known protocol the peer advertises.
            for (i in 0..peerProtocols.size) {
              val protocol = peerProtocols[i] as String
              if (protocol in protocols) {
                selected = protocol
                return selected
              }
            }
            selected = protocols[0] // On no intersection, try peer's first protocol.
            return selected
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

      }
    
      fun setUp(protocol: Protocol) {
        this.protocol = protocol
        platform.assumeNotOpenJSSE()
        if (protocol === Protocol.HTTP_2) {
          platform.assumeHttp2Support()
          server.useHttps(handshakeCertificates.sslSocketFactory())
          client =
            clientTestRule
              .newClientBuilder()
              .protocols(listOf(Protocol.HTTP_2, Protocol.HTTP_1_1))
              .sslSocketFactory(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

       * [priorResponse] objects, which have its own [priorResponse].
       */
      @get:JvmName("request") val request: Request,
      /** Returns the HTTP protocol, such as [Protocol.HTTP_1_1] or [Protocol.HTTP_1_0]. */
      @get:JvmName("protocol") val protocol: Protocol,
      /** Returns the HTTP status message. */
      @get:JvmName("message") val message: String,
      /** Returns the HTTP status code. */
      @get:JvmName("code") val code: Int,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/SocketChannelTest.kt

          assertThat(acceptedHostName).isEqualTo(hostname)
    
          if (socketMode.tlsExtensionMode == STANDARD) {
            assertThat(response.protocol).isEqualTo(socketMode.protocol)
          } else {
            assertThat(response.protocol).isEqualTo(HTTP_1_1)
          }
        }
      }
    
      companion object {
        @Suppress("unused")
        @JvmStatic
        fun connectionTypes(): List<SocketMode> =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 8K bytes
    - Viewed (0)
Back to top