- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for MediaType (0.04 sec)
-
guava/src/com/google/common/net/MediaType.java
MediaType mediaType = addKnownType(new MediaType(type, subtype, UTF_8_CONSTANT_PARAMETERS)); mediaType.parsedCharset = Optional.of(UTF_8); return mediaType; } @CanIgnoreReturnValue private static MediaType addKnownType(MediaType mediaType) { knownTypes.put(mediaType, mediaType); return mediaType; } /* * The following constants are grouped by their type and ordered alphabetically by the constant
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Oct 02 01:46:40 UTC 2025 - 48K bytes - Viewed (0) -
android/guava/src/com/google/common/net/MediaType.java
MediaType mediaType = addKnownType(new MediaType(type, subtype, UTF_8_CONSTANT_PARAMETERS)); mediaType.parsedCharset = Optional.of(UTF_8); return mediaType; } @CanIgnoreReturnValue private static MediaType addKnownType(MediaType mediaType) { knownTypes.put(mediaType, mediaType); return mediaType; } /* * The following constants are grouped by their type and ordered alphabetically by the constant
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Oct 02 01:46:40 UTC 2025 - 48K bytes - Viewed (0) -
okhttp/api/jvm/okhttp.api
public static final fun create (Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody; public static final fun create (Lokhttp3/MediaType;[B)Lokhttp3/RequestBody; public static final fun create (Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody; public static final fun create (Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.2K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
@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) } @JvmStatic @JvmName("create") fun ByteString.toRequestBody(contentType: MediaType? = null): RequestBody = object : RequestBody() {Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 14:16:29 UTC 2025 - 9.3K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/impl/MimeTypeHelperImpl.java
try { if (useFilename) { final MediaType mediaType = mimeTypes.detect(null, metadata); if (!MediaType.OCTET_STREAM.equals(mediaType)) { return mediaType.getType() + "/" + mediaType.getSubtype(); } } final MediaType mediaType = mimeTypes.detect(is == null || is.markSupported() ? is : new BufferedInputStream(is), metadata);Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sun Nov 23 12:19:14 UTC 2025 - 6.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
} @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 fun mockResponse() {Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0) -
okhttp/api/android/okhttp.api
public static final fun create (Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody; public static final fun create (Lokhttp3/MediaType;[B)Lokhttp3/RequestBody; public static final fun create (Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody; public static final fun create (Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
"}}", ) } @Test fun gzip() { val mediaType = "text/plain; charset=utf-8".toMediaType() val originalBody = "This is the original message".toRequestBody(mediaType) assertThat(originalBody.contentLength()).isEqualTo(28L) assertThat(originalBody.contentType()).isEqualTo(mediaType) val request = Request .Builder() .url("https://square.com/")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/InterceptorTest.kt
val originalRequest = chain.request() val mediaType = "text/plain".toMediaType() val body = "abc".toRequestBody(mediaType) chain.proceed( originalRequest .newBuilder() .method("POST", body) .header("Content-Type", mediaType.toString()) .header("Content-Length", body.contentLength().toString())
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 16:11:23 UTC 2025 - 28.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt
fun noAttemptToReadResponseIfLoadingRequestBodyIsSourceOfFailure() { server.enqueue(MockResponse(body = "abc")) val requestBody = object : RequestBody() { override fun contentType(): MediaType? = null override fun writeTo(sink: BufferedSink) { throw IOException("boom") // Despite this exception, 'sink' is healthy. } } val callA = client.newCall(
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 10.4K bytes - Viewed (0)