- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for toResponseBody (0.1 sec)
-
okhttp/src/main/kotlin/okhttp3/ResponseBody.kt
replaceWith = ReplaceWith( expression = "content.toResponseBody(contentType)", imports = ["okhttp3.ResponseBody.Companion.toResponseBody"], ), level = DeprecationLevel.WARNING, ) fun create( contentType: MediaType?, content: String, ): ResponseBody = content.toResponseBody(contentType) @JvmStatic @Deprecated(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyTest.kt
body.close() } @Test fun unicodeText() { val text = "eile oli oliiviõli" val body = text.toResponseBody() assertThat(body.string()).isEqualTo(text) } @Test fun unicodeTextWithCharset() { val text = "eile oli oliiviõli" val body = text.toResponseBody("text/plain; charset=UTF-8".toMediaType()) assertThat(body.string()).isEqualTo(text) } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseJvmTest.kt
import okhttp3.ResponseBody.Companion.toResponseBody import okio.Buffer import okio.BufferedSource import okio.Source import okio.Timeout import okio.buffer import org.junit.jupiter.api.Test class ResponseJvmTest { @Test fun testEmptyByDefaultIfTrailersNotSet() { val response = newResponse("".toResponseBody()) assertThat(response.trailers()).isEmpty() } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt
import java.io.IOException import kotlin.test.assertFailsWith import okhttp3.MediaType.Companion.toMediaType import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody.Companion.toResponseBody import okhttp3.brotli.internal.uncompress import okio.ByteString import okio.ByteString.Companion.EMPTY import okio.ByteString.Companion.decodeHex import okio.ByteString.Companion.encodeUtf8
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
import java.nio.charset.StandardCharsets import java.util.concurrent.atomic.AtomicBoolean import kotlin.test.assertFailsWith import okhttp3.MediaType.Companion.toMediaType import okhttp3.ResponseBody.Companion.toResponseBody import okhttp3.internal.and import okio.Buffer import okio.BufferedSource import okio.ByteString import okio.ByteString.Companion.decodeHex import okio.ForwardingSource import okio.buffer
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartReaderTest.kt
import kotlin.test.assertFailsWith import okhttp3.Headers.Companion.headersOf import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.ResponseBody.Companion.toResponseBody import okio.Buffer import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @Tag("Slowish") class MultipartReaderTest { @Test fun `parse multipart`() { val multipart = """
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
responseBody.close() responseBody = "".toResponseBody("".toMediaType()) responseBody = "".toResponseBody(null) responseBody = ByteString.EMPTY.toResponseBody("".toMediaType()) responseBody = ByteString.EMPTY.toResponseBody(null) responseBody = byteArrayOf(0, 1).toResponseBody("".toMediaType()) responseBody = byteArrayOf(0, 1).toResponseBody(null)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Interceptor.kt
* .request(chain.request()) * .protocol(Protocol.HTTP_1_1) * .code(400) * .message("client config invalid") * .body("client config invalid".toResponseBody(null)) * .build() * } * * return chain.proceed(chain.request()) * } * ``` */ fun interface Interceptor { @Throws(IOException::class) fun intercept(chain: Chain): Response
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt
package okhttp3.internal import okhttp3.Headers import okhttp3.RequestBody import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.ResponseBody import okhttp3.ResponseBody.Companion.toResponseBody import okio.ArrayIndexOutOfBoundsException import okio.Buffer import okio.BufferedSink import okio.BufferedSource import okio.ByteString.Companion.decodeHex import okio.Closeable import okio.FileNotFoundException
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 11K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt
import mockwebserver3.SocketPolicy.DisconnectAtEnd import okhttp3.Headers.Companion.headersOf import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.ResponseBody.Companion.toResponseBody import okhttp3.internal.closeQuietly import okhttp3.testing.PlatformRule import okhttp3.tls.HandshakeCertificates import org.bouncycastle.tls.TlsFatalAlert import org.junit.jupiter.api.BeforeEach
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K bytes - Viewed (0)