Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 223 for protocol (0.03 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/StatusLineTest.kt

        assertThat(statusLine.protocol).isEqualTo(Protocol.HTTP_1_1)
        assertThat(statusLine.code).isEqualTo(code)
      }
    
      @Test
      fun emptyMessage() {
        val version = 1
        val code = 503
        val statusLine = parse("HTTP/1.$version $code ")
        assertThat(statusLine.message).isEqualTo("")
        assertThat(statusLine.protocol).isEqualTo(Protocol.HTTP_1_1)
        assertThat(statusLine.code).isEqualTo(code)
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Platform.kt

         * Returns the concatenation of 8-bit, length prefixed protocol names.
         * http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-04#page-4
         */
        fun concatLengthPrefixed(protocols: List<Protocol>): ByteArray {
          val result = Buffer()
          for (protocol in alpnProtocolNames(protocols)) {
            result.writeByte(protocol.length)
            result.writeUtf8(protocol)
          }
          return result.readByteArray()
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

      }
    
      @Test @Disabled
      fun response() {
        val response: Response = Response.Builder().build()
        val request: Request = response.request()
        val protocol: Protocol = response.protocol()
        val code: Int = response.code()
        val message: String = response.message()
        val handshake: Handshake? = response.handshake()
        val headers: Headers = response.headers()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                    else -> Protocol.HTTP_1_1
                  }
                Platform.get().afterHandshake(sslSocket)
              } else {
                protocol = Protocol.HTTP_1_1
              }
              openClientSockets.remove(raw)
            }
            else -> {
              protocol =
                when {
                  Protocol.H2_PRIOR_KNOWLEDGE in protocols -> Protocol.H2_PRIOR_KNOWLEDGE
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  5. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

            .message("")
            .protocol(Protocol.HTTP_2)
            .build()
        val listener = loggingEventListenerFactory.create(call)
        listener.cacheConditionalHit(call, response)
        listener.cacheHit(call, response)
        listener.cacheMiss(call)
        listener.satisfactionFailure(call, response)
        logRecorder
          .assertLogMatch(Regex("""cacheConditionalHit: Response\{protocol=h2, code=200, message=, url=$url\}"""))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/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()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

            val sslSocket = doSsl(socket)
            val protocolString = Platform.get().getSelectedProtocol(sslSocket)
            val protocol = if (protocolString != null) get(protocolString) else null
            if (protocol != Protocol.HTTP_2) {
              throw ProtocolException("Protocol $protocol unsupported")
            }
            val connection =
              Http2Connection
                .Builder(false, TaskRunner.INSTANCE)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/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()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/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
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/net/URLUtil.java

            }
        }
    
        /**
         * Returns the normalized protocol.
         *
         * @param protocol
         *            The protocol. Must not be {@literal null} or empty.
         * @return The normalized protocol.
         */
        public static String toCanonicalProtocol(final String protocol) {
            assertArgumentNotEmpty("protocol", protocol);
    
            final String canonicalProtocol = CANONICAL_PROTOCOLS.get(protocol);
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 6.8K bytes
    - Viewed (0)
Back to top