Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for Parse (0.23 sec)

  1. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        assertThat(parse("http:\\/host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:/\\host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:\\\\host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:///host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http:\\//host/path"))
          .isEqualTo(parse("http://host/path"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  2. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/Case.kt

    import okhttp3.internal.http2.Header
    import okio.ByteString
    
    /**
     * Representation of an individual case (set of headers and wire format). There are many cases for a
     * single story.  This class is used reflectively with Moshi to parse stories.
     */
    data class Case(
      val seqno: Int = 0,
      val wire: ByteString? = null,
      val headers: List<Map<String, String>>,
    ) : Cloneable {
      val headersList: List<Header>
        get() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 23 10:26:25 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

          assertThat(expected).hasMessage("Failed to parse UTCTime 191216#30210Z")
        }
      }
    
      @Test fun `cannot decode generalized time with offset`() {
        assertFailsWith<ProtocolException> {
          Adapters.GENERALIZED_TIME.fromDer("181332303139313231353139303231302d30383030".decodeHex())
        }.also { expected ->
          assertThat(expected).hasMessage("Failed to parse GeneralizedTime 20191215190210-0800")
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

          else -> false
        }
    
    val Response.commonCacheControl: CacheControl
      get() {
        var result = lazyCacheControl
        if (result == null) {
          result = CacheControl.parse(headers)
          lazyCacheControl = result
        }
        return result
      }
    
    fun Response.commonClose() {
      body.close()
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  5. okhttp/api/okhttp.api

    	public final fun -deprecated_parse (Ljava/lang/String;)Lokhttp3/HttpUrl;
    	public final fun defaultPort (Ljava/lang/String;)I
    	public final fun get (Ljava/lang/String;)Lokhttp3/HttpUrl;
    	public final fun get (Ljava/net/URI;)Lokhttp3/HttpUrl;
    	public final fun get (Ljava/net/URL;)Lokhttp3/HttpUrl;
    	public final fun parse (Ljava/lang/String;)Lokhttp3/HttpUrl;
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  6. container-tests/src/test/java/okhttp3/containers/SocksProxyTest.kt

            ).execute()
    
          assertThat(response.body.string()).contains("Peter the person")
        }
      }
    
      companion object {
        val SOCKS5_PROXY: DockerImageName =
          DockerImageName
            .parse("serjs/go-socks5-proxy")
            .withTag("v0.0.3")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  7. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

        } else {
          emptyList()
        }
      }
    
      /**
       * Convert a request header to OkHttp's cookies via [HttpCookie]. That extra step handles
       * multiple cookies in a single request header, which [Cookie.parse] doesn't support.
       */
      private fun decodeHeaderAsJavaNetCookies(
        url: HttpUrl,
        header: String,
      ): List<Cookie> {
        val result = mutableListOf<Cookie>()
        var pos = 0
        val limit = header.length
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:10:43 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

          if (input.startsWith(":", startIndex = i)) {
            i++
          } else if (input.startsWith(".", startIndex = i)) {
            // If we see a '.', rewind to the beginning of the previous group and parse as IPv4.
            if (!decodeIpv4Suffix(input, groupOffset, limit, address, b - 2)) return null
            b += 2 // We rewound two bytes and then added four.
            break
          } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            originalRequest = fancyRequest,
            listener = webSocketResponse.webSocketListener!!,
            random = SecureRandom(),
            pingIntervalMillis = 0,
            extensions = WebSocketExtensions.parse(webSocketResponse.headers),
            // Compress all messages if compression is enabled.
            minimumDeflateSize = 0L,
            webSocketCloseTimeout = RealWebSocket.CANCEL_AFTER_CLOSE_MILLIS,
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/MediaTypeTest.kt

        val mediaType = parse("text/plain;a=\";charset=utf-8;b=\"")
        assertNull(mediaType.charsetName())
      }
    
      @Test fun testSingleQuotesAreNotSpecial() {
        val mediaType = parse("text/plain;a=';charset=utf-8;b='")
        assertEquals("UTF-8", mediaType.charsetName())
      }
    
      @Test fun testParseWithSpecialCharacters() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
Back to top