- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 56 for charAt (0.21 sec)
-
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
return new MockResponse() .setStatus("HTTP/1.1 404") .addHeader("content-type: text/plain; charset=utf-8") .setBody("NOT FOUND: " + path); } catch (IOException e) { return new MockResponse() .setStatus("HTTP/1.1 500") .addHeader("content-type: text/plain; charset=utf-8") .setBody("SERVER ERROR: " + e); } }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Jan 02 02:50:44 GMT 2019 - 4.7K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
* limitations under the License. */ @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") package okhttp3.logging import java.io.IOException import java.nio.charset.Charset import java.util.TreeSet import java.util.concurrent.TimeUnit import okhttp3.Headers import okhttp3.HttpUrl import okhttp3.Interceptor import okhttp3.OkHttpClient import okhttp3.Response
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 09:14:38 GMT 2024 - 11.2K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
val body = text.toResponseBody("text/plain; charset=unknown".toMediaType()) assertThat(body.string()).isEqualTo(text) } companion object { @JvmOverloads fun body( hex: String, charset: String? = null, ): ResponseBody { val mediaType = if (charset == null) null else "any/thing; charset=$charset".toMediaType() return hex.decodeHex().toResponseBody(mediaType)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersChallengesTest.kt
val headers = Headers.Builder() .add("WWW-Authenticate: Basic realm=\"protected area\", charset=\"UTF-8\"") .build() val expectedAuthParams = mutableMapOf<String?, String>() expectedAuthParams["realm"] = "protected area" expectedAuthParams["charset"] = "UTF-8" assertThat(headers.parseChallenges("WWW-Authenticate")) .isEqualTo(listOf(Challenge("Basic", expectedAuthParams)))
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 16.6K bytes - Viewed (0) -
mockwebserver/README.md
HttpUrl baseUrl = server.url("/v1/chat/"); // Exercise your application code, which should make those HTTP requests. // Responses are returned in the same order that they are enqueued. Chat chat = new Chat(baseUrl); chat.loadMore(); assertEquals("hello, world!", chat.messages()); chat.loadMore(); chat.loadMore(); assertEquals("" + "hello, world!\n"
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 17 15:34:10 GMT 2023 - 5K bytes - Viewed (1) -
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public final class PostFile { 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 { File file = new File("README.md"); Request request = new Request.Builder()
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat May 25 18:02:55 GMT 2019 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
import okhttp3.RequestBody; import okhttp3.Response; import okio.BufferedSink; public final class PostStreaming { 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 { RequestBody requestBody = new RequestBody() { @Override public MediaType contentType() {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Jul 06 03:18:15 GMT 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
server.enqueue( MockResponse( code = 401, headers = headersOf( "WWW-Authenticate", "Basic realm=\"protected area\", charset=\"UTF-8\"", ), body = "Please authenticate with UTF-8.", ), ) server.enqueue( MockResponse( code = 401, headers = headersOf(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0) -
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) -
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)