- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 102 for mediaType (0.09 sec)
-
docs/recipes.md
=== ":material-language-java: Java" ```java public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.parse("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { RequestBody requestBody = new RequestBody() { @Override public MediaType contentType() { return MEDIA_TYPE_MARKDOWN; }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Feb 18 08:52:22 UTC 2022 - 40.2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt
open class ForwardingRequestBody(delegate: RequestBody?) : RequestBody() { private val delegate: RequestBody fun delegate(): RequestBody { return delegate } override fun contentType(): MediaType? { return delegate.contentType() } @Throws(IOException::class) override fun contentLength(): Long { return delegate.contentLength() } @Throws(IOException::class)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
| HttpUrl.uri() | HttpUrl.toUri() | | HttpUrl.url() | HttpUrl.toUrl() | | MediaType.get(String) | String.toMediaType() | | MediaType.parse(String) | String.toMediaTypeOrNull() | | RequestBody.create(ByteArray) | ByteArray.toRequestBody() |
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostFile.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.File import java.io.IOException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.asRequestBody class PostFile { private val client = OkHttpClient() fun run() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp-dnsoverhttps/api/okhttp-dnsoverhttps.api
public final fun url (Lokhttp3/HttpUrl;)Lokhttp3/dnsoverhttps/DnsOverHttps$Builder; } public final class okhttp3/dnsoverhttps/DnsOverHttps$Companion { public final fun getDNS_MESSAGE ()Lokhttp3/MediaType;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 27 15:23:43 UTC 2022 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody import okio.BufferedSink class PostStreaming { private val client = OkHttpClient() fun run() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
Interceptor { chain: Interceptor.Chain -> 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()) .build(),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostString.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody class PostString { private val client = OkHttpClient() fun run() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.asRequestBody import okio.Path.Companion.toPath import okio.buffer import okio.fakefilesystem.FakeFileSystem
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0)