- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 185 for Requestbody (0.05 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
@JvmField val EMPTY: RequestBody = ByteString.EMPTY.toRequestBody() /** * Returns a new request body that transmits this string. If [contentType] is non-null and lacks * a charset, this will use UTF-8. */ @JvmStatic @JvmName("create") fun String.toRequestBody(contentType: MediaType? = null): RequestBody {Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 14:16:29 UTC 2025 - 9.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt
) call.execute().use { response -> val requestBody = (call.request().body as AsyncRequestBody?)!!.takeSink() requestBody.writeUtf8("request A\n") requestBody.flush() val responseBody = response.body.source() assertThat(responseBody.readUtf8Line()) .isEqualTo("response B") requestBody.writeUtf8("request C\n") requestBody.flush() assertThat(responseBody.readUtf8Line())Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 25.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestBodyTest.kt
assertOnFileDescriptor { fd -> val requestBody = fd.toRequestBody() assertThat(requestBody.contentLength()).isEqualTo(-1L) assertThat(requestBody.isOneShot()).isEqualTo(true) } } @Test fun testFileDescriptorRead() { assertOnFileDescriptor(content = "Hello") { fd -> val requestBody = fd.toRequestBody() val buffer = Buffer() requestBody.writeTo(buffer)Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 14:16:29 UTC 2025 - 3.8K bytes - Viewed (1) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
public void run() throws Exception { Map<String, String> requestBody = new LinkedHashMap<>(); requestBody.put("longUrl", "https://publicobject.com/2014/12/04/html-formatting-javadocs/"); RequestBody jsonRequestBody = RequestBody.create( mapJsonAdapter.toJson(requestBody), MEDIA_TYPE_JSON); Request request = new Request.Builder()
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 3.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java
// Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image RequestBody requestBody = new MultipartBody.Builder() .setType(MultipartBody.FORM) .addFormDataPart("title", "Square Logo") .addFormDataPart("image", "logo-square.png", RequestBody.create( new File("docs/images/logo-square.png"), MEDIA_TYPE_PNG)) .build();Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Mon Jun 24 12:59:42 UTC 2019 - 2.2K bytes - Viewed (0) -
okhttp/api/android/okhttp.api
public static synthetic fun create$default (Lokhttp3/RequestBody$Companion;Ljava/lang/String;Lokhttp3/MediaType;ILjava/lang/Object;)Lokhttp3/RequestBody; public static synthetic fun create$default (Lokhttp3/RequestBody$Companion;Lokhttp3/MediaType;[BIIILjava/lang/Object;)Lokhttp3/RequestBody; public static synthetic fun create$default (Lokhttp3/RequestBody$Companion;Lokio/ByteString;Lokhttp3/MediaType;ILjava/lang/Object;)Lokhttp3/RequestBody;
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.3K bytes - Viewed (0) -
docs/de/docs/how-to/custom-request-and-route.md
Einige Anwendungsfälle sind: * Konvertieren von Nicht-JSON-Requestbodys nach JSON (z. B. <a href="https://msgpack.org/index.html" class="external-link" target="_blank">`msgpack`</a>). * Dekomprimierung gzip-komprimierter Requestbodys. * Automatisches Loggen aller Requestbodys. ## Handhaben von benutzerdefinierten Requestbody-Kodierungen { #handling-custom-request-body-encodings }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 13:54:34 UTC 2025 - 5.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt
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() { val requestBody = object : RequestBody() { override fun contentType() = MEDIA_TYPE_MARKDOWN override fun writeTo(sink: BufferedSink) {Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
@Test fun multipartBodyPart() { val requestBody: RequestBody = "".toRequestBody(null) var part: MultipartBody.Part = MultipartBody.Part.create(null, requestBody) part = MultipartBody.Part.create(headersOf(), requestBody) part = MultipartBody.Part.create(requestBody) part = MultipartBody.Part.createFormData("", "") part = MultipartBody.Part.createFormData("", "", requestBody)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0) -
okhttp/api/jvm/okhttp.api
public static synthetic fun create$default (Lokhttp3/RequestBody$Companion;Ljava/lang/String;Lokhttp3/MediaType;ILjava/lang/Object;)Lokhttp3/RequestBody; public static synthetic fun create$default (Lokhttp3/RequestBody$Companion;Lokhttp3/MediaType;[BIIILjava/lang/Object;)Lokhttp3/RequestBody; public static synthetic fun create$default (Lokhttp3/RequestBody$Companion;Lokio/ByteString;Lokhttp3/MediaType;ILjava/lang/Object;)Lokhttp3/RequestBody;
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.2K bytes - Viewed (0)