- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for isOneShot (0.05 seconds)
-
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)