Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 52 for Parse (0.28 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/-RequestCommon.kt

    fun Request.commonNewBuilder(): Request.Builder = Request.Builder(this)
    
    fun Request.commonCacheControl(): CacheControl {
      var result = lazyCacheControl
      if (result == null) {
        result = CacheControl.parse(headers)
        lazyCacheControl = result
      }
      return result
    }
    
    internal fun canonicalUrl(url: String): String {
      // Silently replace web socket URLs with HTTP URLs.
      return when {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  2. container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt

          assertThat(response.body.string()).contains("Peter the person")
        }
      }
    
      companion object {
        val MOCKSERVER_IMAGE: DockerImageName =
          DockerImageName
            .parse("mockserver/mockserver")
            .withTag("mockserver-5.15.0")
    
        fun OkHttpClient.Builder.trustMockServer(): OkHttpClient.Builder =
          apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

    import okhttp3.ResponseBody.Companion.toResponseBody
    import okio.Buffer
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    
    @Tag("Slowish")
    class MultipartReaderTest {
      @Test fun `parse multipart`() {
        val multipart =
          """
          |--simple boundary
          |Content-Type: text/plain; charset=utf-8
          |Content-ID: abc
          |
          |abcd
          |efgh
          |--simple boundary
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

         */
        @JvmStatic
        @JvmName("get")
        fun String.toHttpUrl(): HttpUrl = Builder().parse(null, this).build()
    
        /**
         * Returns a new `HttpUrl` representing `url` if it is a well-formed HTTP or HTTPS URL, or null
         * if it isn't.
         */
        @JvmStatic
        @JvmName("parse")
        fun String.toHttpUrlOrNull(): HttpUrl? {
          return try {
            toHttpUrl()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

          }
    
        if (testData.expectParseFailure()) {
          assertThat(url, "Expected URL to fail parsing").isNull()
          return
        }
    
        assertThat(url, "Expected URL to parse successfully, but was null")
          .isNotNull()
        val effectivePort =
          when {
            url!!.port != defaultPort(url.scheme) -> Integer.toString(url.port)
            else -> ""
          }
        val effectiveQuery =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Request.kt

       */
      @get:JvmName("cacheControl")
      val cacheControl: CacheControl
        get() {
          var result = lazyCacheControl
          if (result == null) {
            result = CacheControl.parse(headers)
            lazyCacheControl = result
          }
          return result
        }
    
      @JvmName("-deprecated_url")
      @Deprecated(
        message = "moved to val",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

      }
    
      /**
       * Ignored due to incompatibilities between Android and Java on how non-ASCII subject alt names
       * are parsed. Android fails to parse these, which means we fall back to the CN. The RI does parse
       * them, so the CN is unused.
       */
      @Test fun verifyNonAsciiSubjectAlt() {
        // Expecting actual:
        //  ["bar.com", "花子.co.jp"]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 40.3K bytes
    - Viewed (0)
  8. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

          if (responseCode != 200 || contentType == null) {
            return;
          }
    
          MediaType mediaType = MediaType.parse(contentType);
          if (mediaType == null || !mediaType.subtype().equalsIgnoreCase("html")) {
            return;
          }
    
          Document document = Jsoup.parse(response.body().string(), url.toString());
          for (Element element : document.select("a[href]")) {
            String href = element.attr("href");
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.TestUtil.repeat
    import okhttp3.internal.concurrent.TaskFaker
    import okhttp3.internal.ws.WebSocketExtensions.Companion.parse
    import okio.ByteString.Companion.decodeHex
    import okio.ByteString.Companion.encodeUtf8
    import okio.Pipe
    import okio.buffer
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.BeforeEach
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Cookie.kt

          return false
        }
    
        /**
         * Attempt to parse a `Set-Cookie` HTTP header value [setCookie] as a cookie. Returns null if
         * [setCookie] is not a well-formed cookie.
         */
        @JvmStatic
        fun parse(
          url: HttpUrl,
          setCookie: String,
        ): Cookie? = parse(System.currentTimeMillis(), url, setCookie)
    
        internal fun parse(
          currentTimeMillis: Long,
          url: HttpUrl,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
Back to top