- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 189 for ContentType (0.05 sec)
-
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 14:16:29 UTC 2025 - 9.3K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 24 11:36:14 UTC 2025 - 24.4K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 14:16:29 UTC 2025 - 3.8K bytes - Viewed (1) -
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: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Fri Nov 28 16:29:12 UTC 2025 - 4.7K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Nov 07 02:57:33 UTC 2025 - 11.5K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
} else { listener.onClosed(this) } } } private fun ResponseBody.isEventStream(): Boolean { val contentType = contentType() ?: return false return contentType.type == "text" && contentType.subtype == "event-stream" } override fun onFailure( call: Call, e: IOException, ) { listener.onFailure(this, e, null) }Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 07:51:20 UTC 2025 - 3.2K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/HcHttpClient.java
Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sun Nov 23 12:19:14 UTC 2025 - 53.7K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/storage/StorageClient.java
* @param inputStream the input stream of data to upload * @param size the size of the data in bytes * @param contentType the MIME type of the content */ void uploadObject(String objectName, InputStream inputStream, long size, String contentType); /** * Downloads an object from storage. * * @param objectName the name/path of the object to downloadRegistered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Sat Dec 13 02:21:17 UTC 2025 - 2.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt
} // Append headers. for ((name, value) in headers) { if (contentType != null && name.equals("Content-Type", ignoreCase = true)) continue append(" \\\n -H ${"$name: $value".shellEscape()}") } if (contentType != null) { append(" \\\n -H ${"Content-Type: $contentType".shellEscape()}") } // Append body if present.Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Oct 30 13:46:58 UTC 2025 - 14.7K bytes - Viewed (1) -
src/main/java/org/codelibs/fess/storage/S3StorageClient.java
} @Override public void uploadObject(final String objectName, final InputStream inputStream, final long size, final String contentType) { try { final PutObjectRequest request = PutObjectRequest.builder().bucket(bucket).key(objectName).contentType(contentType).contentLength(size).build(); s3Client.putObject(request, RequestBody.fromInputStream(inputStream, size));Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Sat Dec 13 02:21:17 UTC 2025 - 10.9K bytes - Viewed (0)