- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 13 for isOneShot (0.05 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/GzipRequestBody.kt
override fun contentLength() = -1L override fun writeTo(sink: BufferedSink) { GzipSink(sink).buffer().use(delegate::writeTo) } override fun isOneShot() = delegate.isOneShot()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 04 17:43:43 GMT 2025 - 1.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
* * A retryable server failure (HTTP 503 with a `Retry-After: 0` response header). * * A misdirected request (HTTP 421) on a coalesced connection. */ open fun isOneShot(): Boolean = false /** * Returns the SHA-256 hash of this [RequestBody] */ @Throws(IOException::class) fun sha256(): ByteString { val hashingSink = HashingSink.sha256(blackholeSink())
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Oct 07 14:16:29 GMT 2025 - 9.3K bytes - Click Count (0) -
okhttp/api/jvm/okhttp.api
public final fun -deprecated_type ()Lokhttp3/MediaType; public final fun boundary ()Ljava/lang/String; public fun contentLength ()J public fun contentType ()Lokhttp3/MediaType; public fun isOneShot ()Z public final fun part (I)Lokhttp3/MultipartBody$Part; public final fun parts ()Ljava/util/List; public final fun size ()I public final fun type ()Lokhttp3/MediaType; public fun writeTo (Lokio/BufferedSink;)V
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 72.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
call.eventListener.followUpDecision(call, response, null) return response } val followUpBody = followUp.body if (followUpBody != null && followUpBody.isOneShot()) { closeActiveExchange = false call.eventListener.followUpDecision(call, response, null) return response } response.body.closeQuietly()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 12.5K bytes - Click Count (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
counter++ assertThat(counter).isLessThanOrEqualTo(1) sink.writeUtf8("Hello request!") sink.close() } override fun isOneShot() = true } val request = request() .post(asyncRequestBody) .build() val response = client.newCall(request).execute()Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Nov 07 02:57:33 GMT 2025 - 39.4K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
override fun contentType(): MediaType? = TODO() override fun contentLength(): Long = TODO() override fun isDuplex(): Boolean = TODO() override fun isOneShot(): Boolean = TODO() override fun writeTo(sink: BufferedSink) = TODO() } requestBody = "".toRequestBody(null) requestBody = "".toRequestBody("".toMediaTypeOrNull())
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 49.7K bytes - Click Count (0) -
okhttp/api/android/okhttp.api
public final fun -deprecated_type ()Lokhttp3/MediaType; public final fun boundary ()Ljava/lang/String; public fun contentLength ()J public fun contentType ()Lokhttp3/MediaType; public fun isOneShot ()Z public final fun part (I)Lokhttp3/MultipartBody$Part; public final fun parts ()Ljava/util/List; public final fun size ()I public final fun type ()Lokhttp3/MediaType; public fun writeTo (Lokio/BufferedSink;)V
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 72.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestBodyTest.kt
} @Test fun testFileDescriptor() { assertOnFileDescriptor { fd -> val requestBody = fd.toRequestBody() assertThat(requestBody.contentLength()).isEqualTo(-1L) assertThat(requestBody.isOneShot()).isEqualTo(true) } } @Test fun testFileDescriptorRead() { assertOnFileDescriptor(content = "Hello") { fd -> val requestBody = fd.toRequestBody() val buffer = Buffer()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Oct 07 14:16:29 GMT 2025 - 3.8K bytes - Click Count (1) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
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 { var buffer = Buffer() requestBody.writeTo(buffer) var gzippedLength: Long? = null
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Nov 07 02:57:33 GMT 2025 - 11.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt
* * * If retries are forbidden with [OkHttpClient.retryOnConnectionFailure]. (OkHttp's defaults * permit retries.) * * If OkHttp already attempted to transmit the request body, and [RequestBody.isOneShot] is * true. * * It won't retry if the exception is a bug or a configuration problem, such as: * * * If the remote peer is untrusted: [exception] is an [SSLPeerUnverifiedException].
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Oct 07 21:03:04 GMT 2025 - 24.9K bytes - Click Count (0)