- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 102 for requestBody (0.09 sec)
-
okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt
import assertk.assertions.isEqualTo import assertk.assertions.isNull import assertk.assertions.startsWith import com.github.ajalt.clikt.core.parse import java.io.IOException import kotlin.test.Test import okhttp3.RequestBody import okio.Buffer class MainTest { @Test fun simple() { val request = fromArgs("http://example.com").createRequest() assertThat(request.method).isEqualTo("GET")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.3K bytes - Viewed (0) -
docs/changelogs/changelog_2x.md
* New: `Headers.of(Map)` creates headers from a Map. ## Version 2.2.0 _2014-12-30_ * **`RequestBody.contentLength()` now throws `IOException`.** This is a source-incompatible change. If you have code that calls `RequestBody.contentLength()`, your compile will break with this update. The change is binary-compatible, however: code compiled
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 26.6K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.RecordingHostnameVerifier import okhttp3.Request import okhttp3.RequestBody import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.logging.HttpLoggingInterceptor.Level import okhttp3.testing.PlatformRule import okio.Buffer import okio.BufferedSink import okio.ByteString.Companion.decodeBase64
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 21 14:27:04 UTC 2025 - 37.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/FormBody.kt
import okhttp3.internal.url.percentDecode import okio.Buffer import okio.BufferedSink class FormBody internal constructor( encodedNames: List<String>, encodedValues: List<String>, ) : RequestBody() { private val encodedNames: List<String> = encodedNames.toImmutableList() private val encodedValues: List<String> = encodedValues.toImmutableList() /** The number of key-value pairs in this form-encoded body. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.3K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/SocketHandler.kt
import okio.Socket /** * Handles a call's request and response streams directly. Use this instead of [MockResponseBody] to * begin sending response data before all request data has been received. * * See [okhttp3.RequestBody.isDuplex]. */ public interface SocketHandler { public fun handle(socket: Socket)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 14 16:09:26 UTC 2025 - 940 bytes - Viewed (0) -
docs/features/interceptors.md
.method(originalRequest.method(), gzip(originalRequest.body())) .build(); return chain.proceed(compressedRequest); } private RequestBody gzip(final RequestBody body) { return new RequestBody() { @Override public MediaType contentType() { return body.contentType(); } @Override public long contentLength() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 8.1K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/it/admin/PluginTests.java
return ITEM_ENDPOINT_SUFFIX; } @Override protected Map<String, Object> createTestParam(int id) { final Map<String, Object> requestBody = new HashMap<>(); return requestBody; } @Override protected Map<String, Object> getUpdateMap() { final Map<String, Object> updateMap = new HashMap<>(); return updateMap; }
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 6.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
getResponse( Request( url = server.url("/b"), body = requestBody, ), ) } } @Test fun fullyBufferedPostIsTooLong() { server.enqueue( MockResponse(body = "A"), ) val requestBody: RequestBody = object : RequestBody() { override fun contentType(): MediaType? = null
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
assertFailsWith<IOException> { call.execute() } assertThat(callRef.get()).isSameInstanceAs(call) } private fun uppercase(original: RequestBody?): RequestBody = object : RequestBody() { override fun contentType(): MediaType? = original!!.contentType() override fun contentLength(): Long = original!!.contentLength()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 28.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt
Thread.sleep(250) response.body.source().readUtf8() response.close() assertThat(call.isCanceled()).isFalse() } private fun sleepingRequestBody(sleepMillis: Int): RequestBody = object : RequestBody() { override fun contentType(): MediaType? = "text/plain".toMediaTypeOrNull() @Throws(IOException::class) override fun writeTo(sink: BufferedSink) { try {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 10.6K bytes - Viewed (0)