Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 460 for Protocol (0.15 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        clientTestRule.recordTaskRunner = true
        return clientTestRule
      }
    
      fun setUp(
        protocol: Protocol,
        server: MockWebServer,
      ) {
        this.server = server
        this.protocol = protocol
        platform.assumeNotOpenJSSE()
        if (protocol === Protocol.HTTP_2) {
          platform.assumeHttp2Support()
          server.useHttps(handshakeCertificates.sslSocketFactory())
          client =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  2. okhttp/src/main/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,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http/ExternalHttp2Example.kt

     */
    package okhttp3.internal.http
    
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Request
    
    object ExternalHttp2Example {
      @JvmStatic
      fun main(args: Array<String>) {
        val client =
          OkHttpClient.Builder()
            .protocols(listOf(Protocol.HTTP_2, Protocol.HTTP_1_1))
            .build()
        val call =
          client.newCall(
            Request.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

          assertThat(response.body.string()).isEqualTo("healthy")
        }
      }
    
      private fun enableProtocol(protocol: Protocol) {
        enableTls()
        client =
          client.newBuilder()
            .protocols(listOf(protocol, Protocol.HTTP_1_1))
            .build()
        server.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client.newBuilder()
            .sslSocketFactory(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

        inetSocketAddress: InetSocketAddress,
        proxy: Proxy,
        protocol: Protocol?,
      ) {
        logWithTime("connectEnd: $protocol")
    
        delegate.connectEnd(call, inetSocketAddress, proxy, protocol)
      }
    
      override fun connectFailed(
        call: Call,
        inetSocketAddress: InetSocketAddress,
        proxy: Proxy,
        protocol: Protocol?,
        ioe: IOException,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/DuplexTest.kt

       */
      private fun enableProtocol(protocol: Protocol) {
        enableTls()
        client =
          client.newBuilder()
            .protocols(listOf(protocol, Protocol.HTTP_1_1))
            .build()
        server.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client.newBuilder()
            .sslSocketFactory(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  7. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

        server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE));
        server.enqueue(new MockResponse().setBody("hello"));
        server.start();
    
        OkHttpClient client = new OkHttpClient.Builder()
            .socketFactory(new UnixDomainSocketFactory(socketFile))
            .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
            .build();
    
        Request request = new Request.Builder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Dec 24 03:46:30 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt

        val s = sslSocket as BCSSLSocket
    
        return when (val protocol = s.applicationProtocol) {
          null, "" -> null
          else -> protocol
        }
      }
    
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<Protocol>,
      ) {
        // No TLS extensions if the socket class is custom.
        if (matchesSocket(sslSocket)) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

              .build()
    
          val response = client.newCall(request).execute()
    
          response.use {
            assertEquals(Protocol.HTTP_2, response.protocol)
            assertEquals(200, response.code)
            // see https://github.com/google/conscrypt/blob/b9463b2f74df42d85c73715a5f19e005dfb7b802/android/src/main/java/org/conscrypt/Platform.java#L613
            when {
    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)
  10. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

          .assertSuccessful()
          .assertCode(200)
      }
    
      private fun enableProtocol(protocol: Protocol) {
        enableTls()
        client =
          client.newBuilder()
            .protocols(listOf(protocol, Protocol.HTTP_1_1))
            .build()
        server1.protocols = client.protocols
        server2.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client.newBuilder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.9K bytes
    - Viewed (0)
Back to top