Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for HTTP_1_0 (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http/StatusLine.kt

    class StatusLine(
      @JvmField val protocol: Protocol,
      @JvmField val code: Int,
      @JvmField val message: String,
    ) {
      override fun toString(): String {
        return buildString {
          if (protocol == Protocol.HTTP_1_0) {
            append("HTTP/1.0")
          } else {
            append("HTTP/1.1")
          }
          append(' ').append(code)
          append(' ').append(message)
        }
      }
    
      companion object {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Protocol.kt

     */
    enum class Protocol(private val protocol: String) {
      /**
       * An obsolete plaintext framing that does not use persistent sockets by default.
       */
      HTTP_1_0("http/1.0"),
    
      /**
       * A plaintext framing that includes persistent connections.
       *
       * This version of OkHttp implements [RFC 7230][rfc_7230], and tracks revisions to that spec.
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:17:33 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/ProtocolTest.kt

    import org.junit.jupiter.api.Assertions.assertThrows
    import org.junit.jupiter.api.Test
    
    class ProtocolTest {
      @Test
      fun testGetKnown() {
        assertThat(get("http/1.0")).isEqualTo(Protocol.HTTP_1_0)
        assertThat(get("http/1.1")).isEqualTo(Protocol.HTTP_1_1)
        assertThat(get("spdy/3.1")).isEqualTo(Protocol.SPDY_3)
        assertThat(get("h2")).isEqualTo(Protocol.HTTP_2)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Jan 04 05:32:07 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http/StatusLineTest.kt

      // https://github.com/square/okhttp/issues/386
      @Test
      fun shoutcast() {
        val statusLine = parse("ICY 200 OK")
        assertThat(statusLine.message).isEqualTo("OK")
        assertThat(statusLine.protocol).isEqualTo(Protocol.HTTP_1_0)
        assertThat(statusLine.code).isEqualTo(200)
      }
    
      @Test
      fun missingProtocol() {
        assertInvalid("")
        assertInvalid(" ")
        assertInvalid("200 OK")
        assertInvalid(" 200 OK")
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Connection.kt

      /**
       * Returns the protocol negotiated by this connection, or [Protocol.HTTP_1_1] if no protocol
       * has been negotiated. This method returns [Protocol.HTTP_1_1] even if the remote peer is using
       * [Protocol.HTTP_1_0].
       */
      fun protocol(): Protocol
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

        fun resetForTests(platform: Platform = findPlatform()) {
          this.platform = platform
        }
    
        fun alpnProtocolNames(protocols: List<Protocol>) = protocols.filter { it != Protocol.HTTP_1_0 }.map { it.toString() }
    
        // This explicit check avoids activating in Android Studio with Android specific classes
        // available when running plugins inside the IDE.
        val isAndroid: Boolean
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  7. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

      }
    
      @Test fun setProtocolsRejectsHttp10() {
        val builder = OkHttpClient.Builder()
        assertFailsWith<IllegalArgumentException> {
          builder.protocols(listOf(Protocol.HTTP_1_0, Protocol.HTTP_1_1))
        }
      }
    
      @Test fun certificatePinnerEquality() {
        val clientA = clientTestRule.newClient()
        val clientB = clientTestRule.newClient()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

         *
         * If multiple protocols are specified, [ALPN][alpn] will be used to negotiate a transport.
         * Protocol negotiation is only attempted for HTTPS URLs.
         *
         * [Protocol.HTTP_1_0] is not supported in this set. Requests are initiated with `HTTP/1.1`. If
         * the server responds with `HTTP/1.0`, that will be exposed by [Response.protocol].
         *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  9. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  10. okhttp/api/okhttp.api

    }
    
    public final class okhttp3/Protocol : java/lang/Enum {
    	public static final field Companion Lokhttp3/Protocol$Companion;
    	public static final field H2_PRIOR_KNOWLEDGE Lokhttp3/Protocol;
    	public static final field HTTP_1_0 Lokhttp3/Protocol;
    	public static final field HTTP_1_1 Lokhttp3/Protocol;
    	public static final field HTTP_2 Lokhttp3/Protocol;
    	public static final field HTTP_3 Lokhttp3/Protocol;
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
Back to top