Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 83 for charter (0.2 sec)

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

        val call =
          client.newCall(
            Request(
              url = server.url("/foo"),
              body =
                object : RequestBody() {
                  override fun contentType(): MediaType = "text/plain; charset=utf-8".toMediaType()
    
                  override fun writeTo(sink: BufferedSink) {
                    sink.write(postBytes)
                  }
                },
            ),
          )
        val response = call.execute()
    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. gradle/wrapper/gradle-wrapper.jar

    hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section)...
    Archive
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 24 09:00:26 GMT 2023
    - 42.4K bytes
    - Viewed (0)
  3. okhttp/src/test/resources/web-platform-test-urltestdata.txt

    # Invalid escaped characters should fail and the percents should be
    # escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191
    http://%zz%66%a.com
    
    # If we get an invalid character that has been escaped.
    http://%25
    http://hello%00
    
    # Escaped numbers should be treated like IP addresses if they are.
    # No special handling for IPv4 or IPv4-like URLs
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/FormBody.kt

                plusIsSpace = false,
                charset = charset,
              )
            values +=
              value.canonicalizeWithCharset(
                encodeSet = FORM_ENCODE_SET,
                // Plus is encoded as `%2B`, space is encoded as plus.
                plusIsSpace = false,
                charset = charset,
              )
          }
    
          fun addEncoded(
            name: String,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CommonRequestBodyTest.kt

        val contentType = requestBody.contentType()!!
    
        assertThat(contentType.mediaType).isEqualTo("text/plain; charset=utf-8")
        assertThat(contentType.parameter("charset")).isEqualTo("utf-8")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val eventListener: EventListener = factory.create(FailingCall())
      }
    
      @Test
      fun mediaType() {
        val mediaType: MediaType = "".toMediaType()
        val defaultCharset: Charset? = mediaType.charset()
        val charset: Charset? = mediaType.charset(Charsets.UTF_8)
        val type: String = mediaType.type
        val subtype: String = mediaType.subtype
        val parse: MediaType? = "".toMediaTypeOrNull()
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  7. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

         * a charset, this will use UTF-8.
         */
        @JvmStatic
        @JvmName("create")
        fun String.toRequestBody(contentType: MediaType? = null): RequestBody {
          val (charset, finalContentType) = contentType.chooseCharset()
          val bytes = toByteArray(charset)
          return bytes.toRequestBody(finalContentType, 0, bytes.size)
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Jan 25 14:41:37 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  8. okhttp/src/test/resources/web-platform-test-toascii.json

        "output": null
      },
      {
        "input": "xn--a.ß",
        "output": null
      },
      {
        "input": "xn--ls8h=",
        "output": null
      },
      {
        "comment": "Invalid Punycode (contains non-ASCII character)",
        "input": "xn--tešla",
        "output": null
      },
      {
        "comment": "Valid Punycode",
        "input": "xn--zca.xn--zca",
        "output": "xn--zca.xn--zca"
      },
      {
        "comment": "Mixed",
    Json
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

        ) {
          // Percent encode this character.
          if (encodedCharBuffer == null) {
            encodedCharBuffer = Buffer()
          }
    
          if (charset == null || charset == Charsets.UTF_8) {
            encodedCharBuffer.writeUtf8CodePoint(codePoint)
          } else {
            encodedCharBuffer.writeString(input, i, i + Character.charCount(codePoint), charset)
          }
    
          while (!encodedCharBuffer.exhausted()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt

          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          println(response.body.string())
        }
      }
    
      companion object {
        val MEDIA_TYPE_MARKDOWN = "text/x-markdown; charset=utf-8".toMediaType()
      }
    }
    
    fun main() {
      PostStreaming().run()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
Back to top