Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 332 for charset (0.15 sec)

  1. okhttp/src/main/kotlin/okhttp3/Challenge.kt

      val charset: Charset
        get() {
          val charset = authParams["charset"]
          if (charset != null) {
            try {
              return Charset.forName(charset)
            } catch (ignore: Exception) {
            }
          }
          return ISO_8859_1
        }
    
      constructor(scheme: String, realm: String) : this(scheme, singletonMap("realm", realm))
    
      init {
        val newAuthParams = mutableMapOf<String?, String>()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/internal.kt

      }
    }
    
    internal fun MediaType?.chooseCharset(): Pair<Charset, MediaType?> {
      var charset: Charset = Charsets.UTF_8
      var finalContentType: MediaType? = this
      if (this != null) {
        val resolvedCharset = this.charset()
        if (resolvedCharset == null) {
          charset = Charsets.UTF_8
          finalContentType = "$this; charset=utf-8".toMediaTypeOrNull()
        } else {
          charset = resolvedCharset
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/MediaTypeJvmTest.kt

        assertEquals(
          "UTF-8",
          noCharset.charset(Charsets.UTF_8)!!.name(),
        )
        assertEquals(
          "US-ASCII",
          noCharset.charset(Charsets.US_ASCII)!!.name(),
        )
        val charset = parse("text/plain; charset=iso-8859-1")
        assertEquals(
          "ISO-8859-1",
          charset.charset(Charsets.UTF_8)!!.name(),
        )
        assertEquals(
          "ISO-8859-1",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  4. docs/en/docs/reference/responses.md

                - chunk_size
                - charset
                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.HTMLResponse
        options:
            members:
                - charset
                - status_code
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

      fun string(): String =
        source().use { source ->
          source.readString(charset = source.readBomAsCharset(charset()))
        }
    
      private fun charset() = contentType().charsetOrUtf8()
    
      override fun close() = commonClose()
    
      internal class BomAwareReader(
        private val source: BufferedSource,
        private val charset: Charset,
      ) : Reader() {
        private var closed: Boolean = false
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/MediaType.kt

      internal val parameterNamesAndValues: Array<String>,
    ) {
      /**
       * Returns the charset of this media type, or [defaultValue] if either this media type doesn't
       * specify a charset, or if its charset is unsupported by the current runtime.
       */
      @JvmOverloads
      fun charset(defaultValue: Charset? = null): Charset? {
        val charset = parameter("charset") ?: return defaultValue
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/MediaTypeTest.kt

        val mediaType = parse("text/plain; charset=utf-8; charset=UTF-8")
        assertEquals("UTF-8", mediaType.charsetName())
      }
    
      @Test fun testMultipleCharsetsReturnsFirstMatch() {
        val mediaType = parse("text/plain; charset=utf-8; charset=utf-16")
        assertEquals("UTF-8", mediaType.charsetName())
      }
    
      /**
       * This is invalid according to RFC 822. But it's what Chrome does and it avoids a potentially
    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)
  8. docs/de/docs/reference/responses.md

                - chunk_size
                - charset
                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.HTMLResponse
        options:
            members:
                - charset
                - status_code
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Feb 19 15:53:39 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. 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)
  10. okhttp/src/main/kotlin/okhttp3/Credentials.kt

     */
    package okhttp3
    
    import java.nio.charset.Charset
    import kotlin.text.Charsets.ISO_8859_1
    import okio.ByteString.Companion.encode
    
    /** Factory for HTTP authorization credentials. */
    object Credentials {
      /** Returns an auth credential for the Basic scheme. */
      @JvmStatic @JvmOverloads
      fun basic(
        username: String,
        password: String,
        charset: Charset = ISO_8859_1,
      ): String {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (0)
Back to top