- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for isDuplex (0.14 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt
return delegate.contentLength() } @Throws(IOException::class) override fun writeTo(sink: BufferedSink) { delegate.writeTo(sink) } override fun isDuplex(): Boolean { return delegate.isDuplex() } override fun toString(): String { return javaClass.simpleName + "(" + delegate.toString() + ")" } init { requireNotNull(delegate) { "delegate == null" }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/StreamHandler.kt
import okhttp3.ExperimentalOkHttpApi /** * Handles a call's stream directly. Use this instead of [MockResponseBody] to begin sending * response data before all request data has been received. * * See [okhttp3.RequestBody.isDuplex]. */ @ExperimentalOkHttpApi interface StreamHandler { fun handle(stream: Stream)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 945 bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt
exchange.responseHeadersStart() invokeStartEvent = false } if (responseBuilder == null) { if (requestBody.isDuplex()) { // Prepare a duplex body so that the application can send a request body later. exchange.flushRequest() val bufferedRequestBody = exchange.createRequestBody(request, true).buffer()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt
internal val eventListener: EventListener, internal val finder: ExchangeFinder, private val codec: ExchangeCodec, ) { /** True if the request body need not complete before the response body starts. */ internal var isDuplex: Boolean = false private set /** True if there was an exception on the connection to the peer. */ internal var hasFailure: Boolean = false private set internal val connection: RealConnection
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt
override fun contentType(): MediaType? = null override fun writeTo(sink: BufferedSink) { requestBodySinks.add(sink) } override fun isDuplex(): Boolean = true @Throws(InterruptedException::class) fun takeSink(): BufferedSink { return requestBodySinks.poll(5, SECONDS) ?: throw AssertionError("no sink to take") } fun assertNoMoreSinks() {
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-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
logger.log("--> END ${request.method}") } else if (bodyHasUnknownEncoding(request.headers)) { logger.log("--> END ${request.method} (encoded body omitted)") } else if (requestBody.isDuplex()) { logger.log("--> END ${request.method} (duplex request body omitted)") } else if (requestBody.isOneShot()) { logger.log("--> END ${request.method} (one-shot body omitted)") } else {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 11.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
.build() val exchange = call.interceptorScopedExchange val followUp = followUpRequest(response, exchange) if (followUp == null) { if (exchange != null && exchange.isDuplex) { call.timeoutEarlyExit() } closeActiveExchange = false return response } val followUpBody = followUp.body
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
* quickly, possibly by handing off the provided request body to another thread to perform * writing. * * [grpc]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md */ open fun isDuplex(): Boolean = commonIsDuplex() /** * Returns true if this body expects at most one call to [writeTo] and can be transmitted
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 25 14:41:37 UTC 2024 - 9.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
val isClosed: Boolean get() = state == STATE_CLOSED override fun createRequestBody( request: Request, contentLength: Long, ): Sink { return when { request.body?.isDuplex() == true -> throw ProtocolException( "Duplex connections are not supported for HTTP/1", ) request.isChunked -> newChunkedSink() // Stream a request body of unknown length.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
delay: Long, timeUnit: TimeUnit, ) : RequestBody() { private val delayMillis = timeUnit.toMillis(delay) override fun contentType() = delegate.contentType() override fun isDuplex() = true override fun writeTo(sink: BufferedSink) { executorService.schedule({ try { delegate.writeTo(sink) sink.close() } catch (e: IOException) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0)