- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for Slavin (0.17 sec)
-
samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt
request.addHeader("Accept", "text/plain") httpClient.execute(request).use { response -> assertThat(response.code).isEqualTo(200) assertThat(EntityUtils.toString(response.entity)).isEqualTo("hello, Apache HttpClient 5.x") } val recorded = server.takeRequest() assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.1K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
* * Example: * ``` * --> POST /greeting http/1.1 * Host: example.com * Content-Type: plain/text * Content-Length: 3 * --> END POST * * <-- 200 OK (22ms) * Content-Type: plain/text * Content-Length: 6 * <-- END HTTP * ``` */ HEADERS, /**
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) -
samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt
.header("Accept", "text/plain") .build() val response = httpClient.send(request, BodyHandlers.ofString()) assertThat(response.statusCode()).isEqualTo(200) assertThat(response.body()).isEqualTo("hello, Java HTTP Client") val recorded = server.takeRequest() assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestBodyTest.kt
assertThat(requestBody.contentType()).isNull() } } @Test fun testFileDescriptorMediaType() { assertOnFileDescriptor { fd -> val contentType = "text/plain".toMediaType() val requestBody = fd.toRequestBody(contentType) assertThat(requestBody.contentType()).isEqualTo(contentType) } } @Test fun testFileDescriptorReadTwice() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.6K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
body.byteStream().close() assertThat(closed.get()).isTrue() } @Test fun unicodeTextWithUnsupportedEncoding() { val text = "eile oli oliiviõli" val body = text.toResponseBody("text/plain; charset=unknown".toMediaType()) assertThat(body.string()).isEqualTo(text) } companion object { @JvmOverloads fun body( hex: String, charset: String? = null,
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/URLConnectionTest.kt
fun getContentTypeConnects() { server.enqueue( MockResponse( headers = headersOf("Content-Type", "text/plain"), body = "ABC", ), ) val response = getResponse(newRequest("/")) assertThat(response.body.contentType()).isEqualTo( "text/plain".toMediaType(), ) response.body.close() } @Test fun getContentEncodingConnects() {
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/test/java/okhttp3/RequestTest.kt
val contentType = "text/plain".toMediaType() val body = "\u0800".toRequestBody(contentType) assertThat(body.contentType()).isEqualTo("text/plain; charset=utf-8".toMediaType()) assertThat(body.contentLength()).isEqualTo(3) assertThat(bodyToHex(body)).isEqualTo("e0a080") } @Test fun stringWithNonDefaultCharsetSpecified() { val contentType = "text/plain; charset=utf-16be".toMediaType()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 16.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartBodyTest.kt
|Content-Disposition: form-data; name="files" |Content-Type: multipart/mixed; boundary=BbC04y | |--BbC04y |Content-Disposition: file; filename="file1.txt" |Content-Type: text/plain; charset=utf-8 | |... contents of file1.txt ... |--BbC04y |Content-Disposition: file; filename="file2.gif" |Content-Transfer-Encoding: binary |Content-Type: image/gif |
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
val interceptorResponse = Response.Builder() .request(request) .protocol(Protocol.HTTP_1_1) .code(200) .message("Intercepted!") .body("abc".toResponseBody("text/plain; charset=utf-8".toMediaType())) .build() client = client.newBuilder() .addInterceptor(Interceptor { chain: Interceptor.Chain? -> interceptorResponse }) .build()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 27.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
} private fun sleepingRequestBody(sleepMillis: Int): RequestBody { return object : RequestBody() { override fun contentType(): MediaType? { return "text/plain".toMediaTypeOrNull() } @Throws(IOException::class) override fun writeTo(sink: BufferedSink) { try { sink.writeUtf8("abc") sink.flush()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0)