- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 75 for MediaType (0.04 sec)
-
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt
import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import java.io.IOException import kotlin.test.assertFailsWith import okhttp3.CompressionInterceptor import okhttp3.Gzip import okhttp3.MediaType.Companion.toMediaType import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody.Companion.toResponseBody import okio.ByteString import okio.ByteString.Companion.EMPTY
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Aug 22 08:12:58 UTC 2025 - 4.4K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingResponseBody.kt
open class ForwardingResponseBody( delegate: ResponseBody?, ) : ResponseBody() { private val delegate: ResponseBody fun delegate(): ResponseBody = delegate override fun contentType(): MediaType? = delegate.contentType() override fun contentLength(): Long = delegate.contentLength() override fun source(): BufferedSource = delegate.source()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.recipes.kt import java.io.File import java.io.IOException import okhttp3.MediaType.Companion.toMediaType import okhttp3.MultipartBody import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.asRequestBody class PostMultipart { private val client = OkHttpClient()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.1K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
import java.net.UnknownHostException import java.util.Arrays import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import mockwebserver3.junit5.StartStop import okhttp3.HttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Protocol import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.Response
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 10.2K 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/CancelTest.kt
import okhttp3.CallEvent.ConnectionReleased import okhttp3.CallEvent.RequestFailed import okhttp3.CallEvent.ResponseFailed import okhttp3.DelegatingServerSocketFactory import okhttp3.DelegatingSocketFactory import okhttp3.MediaType import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Protocol.HTTP_1_1 import okhttp3.RecordingEventListener import okhttp3.Request import okhttp3.RequestBody import okhttp3.SimpleProvider
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 9.8K bytes - Viewed (0) -
README.md
return response.body().string(); } } ``` Post to a Server ---------------- This program posts data to a service. [Full source][post_example]. ```java public static final MediaType JSON = MediaType.get("application/json"); OkHttpClient client = new OkHttpClient(); String post(String url, String json) throws IOException { RequestBody body = RequestBody.create(json, JSON);
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 07:33:49 UTC 2025 - 8.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
import okhttp3.CallEvent.ResponseHeadersEnd import okhttp3.CallEvent.ResponseHeadersStart import okhttp3.CallEvent.RetryDecision import okhttp3.CallEvent.SecureConnectEnd import okhttp3.CallEvent.SecureConnectStart import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.ResponseBody.Companion.toResponseBody import okhttp3.internal.DoubleInetAddressDns import okhttp3.internal.RecordingOkAuthenticator
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 60.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestBodyTest.kt
import assertk.assertions.isEqualTo import assertk.assertions.isNull import java.io.FileDescriptor import java.io.FileInputStream import java.io.IOException import java.nio.file.Path import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.asRequestBody import okhttp3.RequestBody.Companion.toRequestBody import okio.Buffer import okio.FileSystem import okio.Path.Companion.toOkioPath
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.6K bytes - Viewed (1) -
docs/changelogs/changelog_3x.md
when the URL is malformed instead of returning null. Use this to avoid checking for null in situations where the input is known to be well-formed. We've also added `MediaType.get(String)` which is an exception-throwing alternative to `MediaType.parse(String)`. * New: The `EventListener` API previewed in OkHttp 3.9 has graduated to a stable API. Use this interface to track metrics and monitor HTTP requests' size and duration.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 14:55:54 UTC 2022 - 50.8K bytes - Viewed (0)