- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 52 for BufferedSink (0.11 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/internal/BufferMockResponseBody.kt
import okio.Buffer import okio.BufferedSink internal fun Buffer.toMockResponseBody(): MockResponseBody { val defensiveCopy = clone() return BufferMockResponseBody(defensiveCopy) } internal class BufferMockResponseBody( val buffer: Buffer, ) : MockResponseBody { override val contentLength = buffer.size override fun writeTo(sink: BufferedSink) { buffer.copyTo(sink.buffer)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 07 16:05:34 UTC 2024 - 1.1K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3 import java.io.IOException import okio.BufferedSink open class ForwardingRequestBody(delegate: RequestBody?) : RequestBody() { private val delegate: RequestBody fun delegate(): RequestBody { return delegate }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/FormBody.kt
import okhttp3.internal.toImmutableList import okhttp3.internal.url.FORM_ENCODE_SET import okhttp3.internal.url.canonicalizeWithCharset import okhttp3.internal.url.percentDecode import okio.Buffer import okio.BufferedSink class FormBody internal constructor( encodedNames: List<String>, encodedValues: List<String>, ) : RequestBody() { private val encodedNames: List<String> = encodedNames.toImmutableList()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 09 12:33:05 UTC 2024 - 4.3K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/Stream.kt
*/ package mockwebserver3 import okhttp3.ExperimentalOkHttpApi import okio.BufferedSink import okio.BufferedSource /** * A bidirectional sequence of data frames exchanged between client and server. */ @ExperimentalOkHttpApi interface Stream { val requestBody: BufferedSource val responseBody: BufferedSink /** * Terminate the stream so that no further data is transmitted or received. Note that
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 1.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt
* limitations under the License. */ package okhttp3 import java.io.IOException import okhttp3.Interceptor.Chain import okio.Buffer import okio.BufferedSink import okio.ForwardingSink import okio.Sink import okio.buffer /** Rewrites the request body sent to the server to be all uppercase. */ class UppercaseRequestInterceptor : Interceptor {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
} override fun writeTo(sink: BufferedSink) { sink.writeUtf8("<el") sink.flush() throw IOException("failed to stream the XML") } } class ValidRequestBody : RequestBody() { override fun contentType(): MediaType { return "application/xml".toMediaType() } override fun writeTo(sink: BufferedSink) { sink.writeUtf8("<element/>")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
*/ package okhttp3.recipes; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okio.BufferedSink; public final class PostStreaming { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
import okhttp3.Request import okhttp3.RequestBody import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import okhttp3.testing.PlatformRule import okio.Buffer import okio.BufferedSink import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.RegisterExtension
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.internal.http2 import java.io.IOException import okhttp3.internal.and import okio.BufferedSink import okio.BufferedSource import okio.ByteString /** * This class was originally composed from the following classes in * [Twitter Hpack][twitter_hpack]. * * * `com.twitter.hpack.HuffmanEncoder`
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
return original!!.contentLength() } override fun writeTo(sink: BufferedSink) { val uppercase = uppercase(sink) val bufferedSink = uppercase.buffer() original!!.writeTo(bufferedSink) bufferedSink.emit() } } } private fun uppercase(original: BufferedSink): Sink { return object : ForwardingSink(original) { override fun write(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K bytes - Viewed (0)