- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 281 for ContentType (1.66 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt
val buffer = Buffer().writeString(this, charset) return buffer.asResponseBody(finalContentType, buffer.size) } /** Returns a new response body that transmits this byte array. */ @JvmStatic @JvmName("create") fun ByteArray.toResponseBody(contentType: MediaType? = null): ResponseBody = Buffer() .write(this)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:51:25 UTC 2025 - 11.6K bytes - Viewed (0) -
cmd/object-lambda-handlers_test.go
statusCode int body string contentType string expectStatus int }{ { name: "Success 206 Partial Content", statusCode: 206, body: "partial-object-data", contentType: "text/plain", expectStatus: 206, }, { name: "Success 200 OK", statusCode: 200, body: "full-object-data", contentType: "application/json", expectStatus: 200, },
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Jul 18 21:56:31 UTC 2025 - 5.2K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
/** * Returns a new request body that transmits this string. If [contentType] is non-null and lacks * 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)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
val contentType = "text/plain; charset=utf-16be".toMediaType() val body = "\u0800".toRequestBody(contentType) assertThat(body.contentType()).isEqualTo(contentType) assertThat(body.contentLength()).isEqualTo(2) assertThat(bodyToHex(body)).isEqualTo("0800") } @Test fun byteArray() { val contentType = "text/plain".toMediaType() val body: RequestBody = "abc".toByteArray().toRequestBody(contentType)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 19K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
!contentEncoding.equals("gzip", ignoreCase = true) } private fun bodyIsStreaming(response: Response): Boolean { val contentType = response.body.contentType() return contentType != null && contentType.type == "text" && contentType.subtype == "event-stream" } companion object
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 21 14:27:04 UTC 2025 - 11.4K bytes - Viewed (0) -
src/test/java/org/codelibs/core/net/MimeTypeUtilTest.java
final String contentType = MimeTypeUtil.guessContentType(path); assertEquals("text/html", contentType); } /** * @throws Exception */ @Test public void testGetFromStream_gif() throws Exception { final String path = ClassUtil.getPackageName(this.getClass()).replaceAll("\\.", "/") + "/ccc.gif"; final String contentType = MimeTypeUtil.guessContentType(path);
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 2.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartBody.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.9K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/OsddHelper.java
this.encoding = encoding; } /** * Sets the content type. * * @param contentType the content type */ public void setContentType(final String contentType) { this.contentType = contentType; }
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 4.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestBodyTest.kt
val requestBody = fd.toRequestBody() 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() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.6K bytes - Viewed (1) -
src/test/java/org/codelibs/fess/it/ITBase.java
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 3.4K bytes - Viewed (0)