Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 56 for charAt (0.17 sec)

  1. 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)
  2. 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)
  3. 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)
  4. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

     * @param charset which charset to use, null equals UTF-8.
     */
    internal fun String.canonicalizeWithCharset(
      pos: Int = 0,
      limit: Int = length,
      encodeSet: String,
      alreadyEncoded: Boolean = false,
      strict: Boolean = false,
      plusIsSpace: Boolean = false,
      unicodeAllowed: Boolean = false,
      charset: Charset? = null,
    ): String {
      var codePoint: Int
      var i = pos
    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)
  5. okhttp/api/okhttp.api

    	public final fun -deprecated_type ()Ljava/lang/String;
    	public final fun charset ()Ljava/nio/charset/Charset;
    	public final fun charset (Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;
    	public static synthetic fun charset$default (Lokhttp3/MediaType;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/nio/charset/Charset;
    	public fun equals (Ljava/lang/Object;)Z
    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. okhttp/src/main/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

            val credential =
              Credentials.basic(
                auth.userName,
                String(auth.password),
                challenge.charset,
              )
            return request.newBuilder()
              .header(credentialHeader, credential)
              .build()
          }
        }
    
        return null // No challenges were satisfied!
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

    import okhttp3.Response;
    import okio.BufferedSink;
    import okio.Okio;
    import okio.Pipe;
    
    public final class PostStreamingWithPipe {
      public static final MediaType MEDIA_TYPE_MARKDOWN
          = MediaType.get("text/x-markdown; charset=utf-8");
    
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        final PipeBody pipeBody = new PipeBody();
    
        Request request = new Request.Builder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

        // Less than 65,536 bytes, because we binary search on a 14-bit index with a stride of 4 bytes.
        assertThat(compactTable.ranges.length).isLessThan((1 shl 14) * 4)
    
        // Less than 16,384 chars, because we index on a 14-bit index in the ranges table.
        assertThat(compactTable.mappings.length).isLessThan(1 shl 14)
    
        // Confirm the data strings are ASCII.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CacheTest.kt

            .header("Accept-Charset", "UTF-8")
            .header("Accept-Encoding", "identity")
            .build()
        val response1 = client.newCall(request).execute()
        assertThat(response1.body.string()).isEqualTo("A")
        val request1 =
          Request.Builder()
            .url(url)
            .header("Accept-Language", "fr-CA")
            .header("Accept-Charset", "UTF-8")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  10. 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)
Back to top