- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 15 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/src/commonJvmAndroid/kotlin/okhttp3/MultipartBody.kt
/** The number of parts in this multipart body. */ @get:JvmName("size") val size: Int get() = parts.size fun part(index: Int): Part = parts[index] override fun isOneShot(): Boolean = parts.any { it.body.isOneShot() } /** A combination of [type] and [boundaryByteString]. */ override fun contentType(): MediaType = contentType @JvmName("-deprecated_type") @Deprecated( message = "moved to val",Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 10.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MultipartBodyTest.kt
| """.trimMargin().replace("\n", "\r\n") val body = MultipartBody .Builder("123") .addPart("Hello, World!".toRequestBody(null)) .build() assertThat(body.isOneShot()).isEqualTo(false) val buffer = Buffer() body.writeTo(buffer) assertThat(body.contentLength()).isEqualTo(buffer.size) assertThat(buffer.readUtf8()).isEqualTo(expected)Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 10.5K 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)