- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 102 for requestBody (0.06 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/PostString.kt
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() { val postBody = """ |Releases |-------- | | * _1.0_ May 6, 2013
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
.Builder() .url(server.url("/")) .method("POST", requestBody1) .build() val response1 = client.newCall(request1).execute() assertThat(response1.code).isEqualTo(200) // Call 2: check for the absence of a deadline on the request body. val requestBody2: RequestBody = object : RequestBody() { override fun contentType(): MediaType = "text/plain".toMediaType()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 146.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
* 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 class PostPath { private val client = OkHttpClient()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt
* * This nesting is typical but not strict. For example, when calls use "Expect: continue" the * request body start and end events occur within the response header events. Similarly, * [duplex calls][RequestBody.isDuplex] interleave the request and response bodies. * * Since connections may be reused, the proxy selection, DNS, and connect events may not be present
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 17.4K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt
@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 internal fun Main.commonCreateRequest(): Request { val request = Request.Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/CancelTest.kt
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 import okhttp3.internal.http.CancelTest.CancelMode.CANCEL import okhttp3.internal.http.CancelTest.CancelMode.INTERRUPT import okhttp3.internal.http.CancelTest.ConnectionType.H2
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 9.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt
import okhttp3.Headers.Companion.headersOf import okhttp3.OkHttpClientTestRule import okhttp3.Protocol import okhttp3.RecordingEventListener import okhttp3.RecordingHostnameVerifier import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.internal.duplex.MockSocketHandler import okhttp3.testing.PlatformRule import okio.ProtocolException import okio.buffer import okio.use import org.junit.jupiter.api.Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 7.1K bytes - Viewed (0) -
README.md
```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); Request request = new Request.Builder() .url(url) .post(body) .build(); try (Response response = client.newCall(request).execute()) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 07:33:49 UTC 2025 - 8.8K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
} return RecordedRequest( requestLine = request, headers = headers.build(), chunkSizes = chunkSizes, bodySize = requestBody.receivedByteCount, body = when { hasBody -> requestBody.buffer.readByteString() else -> null }, connectionIndex = connectionIndex, exchangeIndex = exchangeIndex, socket = socket,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 20:36:00 UTC 2025 - 40.3K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
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 import okhttp3.TestUtil.assumeNotWindows import okhttp3.testing.PlatformRule import org.junit.jupiter.api.Assertions.fail import org.junit.jupiter.api.BeforeEach
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 10.2K bytes - Viewed (0)