- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for toRequestBody (0.11 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
replaceWith = ReplaceWith( expression = "content.toRequestBody(contentType)", imports = ["okhttp3.RequestBody.Companion.toRequestBody"], ), level = DeprecationLevel.WARNING, ) fun create( contentType: MediaType?, content: String, ): RequestBody = content.toRequestBody(contentType) @JvmStatic @Deprecated(
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-27 14:51 - 9.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
import okhttp3.RequestBody.Companion.asRequestBody import okhttp3.RequestBody.Companion.toRequestBody import okio.Buffer import okio.ByteString.Companion.encodeUtf8 import org.junit.jupiter.api.Test class RequestTest { @Test fun constructor() { val url = "https://example.com/".toHttpUrl() val body = "hello".toRequestBody() val headers = headersOf("User-Agent", "RequestTest") val method = "PUT"
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 16.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MultipartBodyTest.kt
|Fox |--123-- | """.trimMargin().replace("\n", "\r\n") val body = MultipartBody .Builder("123") .addPart("Quick".toRequestBody(null)) .addPart("Brown".toRequestBody(null)) .addPart("Fox".toRequestBody(null)) .build() assertThat(body.boundary).isEqualTo("123") assertThat(body.type).isEqualTo(MultipartBody.MIXED) assertThat(body.contentType().toString())
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 10.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
} requestBody = "".toRequestBody(null) requestBody = "".toRequestBody("".toMediaTypeOrNull()) requestBody = ByteString.EMPTY.toRequestBody(null) requestBody = ByteString.EMPTY.toRequestBody("".toMediaTypeOrNull()) requestBody = byteArrayOf(0, 1).toRequestBody(null, 0, 2) requestBody = byteArrayOf(0, 1).toRequestBody("".toMediaTypeOrNull(), 0, 2)
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 46.5K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.RecordingHostnameVerifier import okhttp3.Request import okhttp3.RequestBody import okhttp3.RequestBody.Companion.gzip 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: 2025-05-30 11:42 - Last Modified: 2025-05-10 11:15 - 37.7K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
| RequestBody.create(ByteArray) | ByteArray.toRequestBody() | | RequestBody.create(ByteString) | ByteString.toRequestBody() | | RequestBody.create(File) | File.asRequestBody() | | RequestBody.create(String) | String.toRequestBody() | | ResponseBody.create(BufferedSource) | BufferedSource.asResponseBody() |
Registered: 2025-05-30 11:42 - Last Modified: 2022-02-06 16:58 - 10.9K 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: 2025-05-30 11:42 - Last Modified: 2025-05-10 13:39 - 10.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt
import mockwebserver3.internal.duplex.MockStreamHandler import okhttp3.CallEvent.FollowUpDecision import okhttp3.Credentials.basic import okhttp3.Headers.Companion.headersOf import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.TestUtil.assumeNotWindows import okhttp3.internal.RecordingOkAuthenticator import okhttp3.internal.duplex.AsyncRequestBody import okhttp3.testing.PlatformRule import okio.BufferedSink
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-27 14:58 - 24.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestCommonTest.kt
import okhttp3.Headers.Companion.headersOf import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.RequestBody.Companion.toRequestBody class RequestCommonTest { @Test fun constructorNormal() { val url = "https://example.com/".toHttpUrl() val body = "hello".toRequestBody() val headers = headersOf("User-Agent", "RequestTest") val method = "PUT" val request = Request( url = url,
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 10.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MultipartReaderTest.kt
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-28 02:11 - 15.4K bytes - Viewed (0)