- Sort Score
- Num 10 results
- Language All
Results 11 - 14 of 14 for isOneShot (0.06 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
assertThat(cache.hitCount()).isEqualTo(0) } private fun String.toOneShotRequestBody(): RequestBody = object : RequestBody() { val internalBody = Stream.of(this) override fun isOneShot(): Boolean = true override fun contentType(): MediaType? = "application/text-plain".toMediaTypeOrNull() override fun writeTo(sink: BufferedSink) { internalBody.forEach { item ->
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Mar 20 09:13:37 GMT 2026 - 121K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
override fun contentType(): MediaType? = null override fun writeTo(sink: BufferedSink) { sink.writeUtf8("attempt " + attempt++) } override fun isOneShot(): Boolean = true }, ) val response = client.newCall(request).execute() assertThat(response.code).isEqualTo(503) assertThat(response.body.string()).isEqualTo("please retry")
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:02:18 GMT 2026 - 146.5K bytes - Click Count (0) -
CHANGELOG.md
* New: `OkHttpClient.webSocketCloseTimeout` configures how long a web socket connection will wait for a graceful shutdown before it performs an abrupt shutdown. * Fix: Honor `RequestBody.isOneShot()` in `MultipartBody` * Fix in `okhttp-coroutines`: Don't leak response bodies in `executeAsync()`. We had a bug where we didn't call `Response.close()` if the coroutine was canceled before its response wasCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 15 11:57:47 GMT 2026 - 36.2K bytes - Click Count (2) -
docs/changelogs/changelog_3x.md
most common use of duplex calls is [gRPC][grpc_http2]. * New: Prevent OkHttp from retransmitting a request body by overriding `RequestBody.isOneShot()`. This is most useful when writing the request body is destructive. * New: We've added `requestFailed()` and `responseFailed()` methods to `EventListener`. These
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 06 14:55:54 GMT 2022 - 50.8K bytes - Click Count (0)