- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for AsyncRequestBody (0.17 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt
import okhttp3.RequestBody import okio.BufferedSink import org.junit.jupiter.api.Assertions.assertTrue /** A duplex request body that keeps the provided sinks so they can be written to later. */ class AsyncRequestBody : RequestBody() { private val requestBodySinks: BlockingQueue<BufferedSink> = LinkedBlockingQueue() override fun contentType(): MediaType? = null override fun writeTo(sink: BufferedSink) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
.build(), ) val call = client.newCall( Request.Builder() .url(server.url("/")) .post(AsyncRequestBody()) .build(), ) call.execute().use { response -> val requestBody = (call.request().body as AsyncRequestBody?)!!.takeSink() requestBody.writeUtf8("request A\n") requestBody.flush() val responseBody = response.body.source()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import mockwebserver3.SocketPolicy.DoNotReadRequestBody import okhttp3.Headers.Companion.headersOf import okhttp3.internal.duplex.AsyncRequestBody import okhttp3.internal.http2.ErrorCode import okhttp3.testing.PlatformRule import okio.BufferedSink import okio.IOException import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Disabled
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
url = server.url("/") setLevel(Level.BODY) server.enqueue( MockResponse.Builder() .body("Hello response!") .build(), ) val asyncRequestBody: RequestBody = object : RequestBody() { override fun contentType(): MediaType? { return null } override fun writeTo(sink: BufferedSink) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 37.6K bytes - Viewed (0)