- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 41 for mediaType (0.09 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MediaType.kt
* Content-Type header. */ override fun toString(): String = mediaType override fun equals(other: Any?): Boolean = other is MediaType && other.mediaType == mediaType override fun hashCode(): Int = mediaType.hashCode() companion object { private const val TOKEN = "([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)" private const val QUOTED = "\"([^\"]*)\""
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:51:08 UTC 2025 - 5.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
*/ package okhttp3.recipes; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; 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();
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MediaTypeJvmTest.kt
withLocale(Locale("en", "US")) { val mediaType = parse("IMAGE/JPEG") assertEquals("image", mediaType.type) assertEquals("jpeg", mediaType.subtype) } } @Test fun testTurkishDotlessIWithTrTr() { withLocale(Locale("tr", "TR")) { val mediaType = parse("IMAGE/JPEG") assertEquals("image", mediaType.type) assertEquals("jpeg", mediaType.subtype) } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/util/SearchEngineUtil.java
* @param mediaType the media type for the content builder * @return an OutputStream containing the built content, or an empty ByteArrayOutputStream if an error occurs */ public static OutputStream getXContentBuilderOutputStream(final XContentBuilderCallback func, final MediaType mediaType) { try (final XContentBuilder builder = func.apply(mediaType.contentBuilder(), ToXContent.EMPTY_PARAMS)) {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 5.1K 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 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/MediaTypeTest.kt
assertEquals("2", mediaType.parameter("b")) assertEquals("3", mediaType.parameter("c")) assertEquals("utf-8", mediaType.parameter("CHARSET")) assertEquals("1", mediaType.parameter("A")) assertEquals("2", mediaType.parameter("B")) assertEquals("3", mediaType.parameter("C")) } @Test fun testCharsetAndQuoting() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 7.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyTest.kt
import okio.Source import okio.buffer class ResponseBodyTest { @Test fun sourceEmpty() { val mediaType = if (null == null) null else "any/thing; charset=${null}".toMediaType() val body = "".decodeHex().toResponseBody(mediaType) val source = body.source() assertThat(source.exhausted()).isTrue() assertThat(source.readUtf8()).isEqualTo("") } @Test fun sourceClosesUnderlyingSource() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealResponseBody.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.internal.http import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.ResponseBody import okio.BufferedSource class RealResponseBody( /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
*/ package okhttp3.recipes; import java.io.File; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; 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();
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java
package okhttp3.recipes; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okio.BufferedSink; import okio.Okio; import okio.Pipe; public final class PostStreamingWithPipe { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8");
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 3.1K bytes - Viewed (0)