- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 102 for mediaType (0.1 sec)
-
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
companion object { @JvmOverloads fun body( hex: String, charset: String? = null, ): ResponseBody { val mediaType = if (charset == null) null else "any/thing; charset=$charset".toMediaType() return hex.decodeHex().toResponseBody(mediaType) } fun exhaust(reader: Reader): String { val builder = StringBuilder() val buf = CharArray(10) var read: Int
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K bytes - Viewed (0) -
okhttp/api/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 70.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt
} internal fun ResponseBody.commonClose() = source().closeQuietly() internal fun ByteArray.commonToResponseBody(contentType: MediaType?): ResponseBody { return Buffer() .write(this) .asResponseBody(contentType, size.toLong()) } internal fun ByteString.commonToResponseBody(contentType: MediaType?): ResponseBody { return Buffer() .write(this) .asResponseBody(contentType, size.toLong()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.3K bytes - Viewed (0) -
okhttp/src/main/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 = commonToRequestBody(contentType)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 25 14:41:37 UTC 2024 - 9.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/internal.kt
cipherSuitesAsString.intersect(socketEnabledCipherSuites, CipherSuite.ORDER_BY_NAME) } else { socketEnabledCipherSuites } } internal fun MediaType?.chooseCharset(): Pair<Charset, MediaType?> { var charset: Charset = Charsets.UTF_8 var finalContentType: MediaType? = this if (this != null) { val resolvedCharset = this.charset() if (resolvedCharset == null) { charset = Charsets.UTF_8
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.7K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
* * https://console.developers.google.com/project */ public static final String GOOGLE_API_KEY = "AIzaSyAx2WZYe0My0i-uGurpvraYJxO7XNbwiGs"; public static final MediaType MEDIA_TYPE_JSON = MediaType.get("application/json"); private final OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new GzipRequestInterceptor()) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 3.8K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt
* limitations under the License. */ @file:Suppress("ktlint:standard:filename") package okhttp3.curl.internal import java.io.IOException import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.curl.Main import okhttp3.internal.http.StatusLine import okio.sink
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/guide/PostExample.java
* limitations under the License. */ package okhttp3.guide; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public class PostExample { public static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); final OkHttpClient client = new OkHttpClient();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ResponseBody.kt
@JvmStatic @JvmName("create") fun ByteArray.toResponseBody(contentType: MediaType? = null): ResponseBody = commonToResponseBody(contentType) /** Returns a new response body that transmits this byte string. */ @JvmStatic @JvmName("create") fun ByteString.toResponseBody(contentType: MediaType? = null): ResponseBody = commonToResponseBody(contentType)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0)