- Sort Score
- Result 10 results
- Languages All
Results 151 - 160 of 956 for BODY (0.02 sec)
-
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
val request by lazy { Request(server.url("/")) } @Test fun suspendCall() { runTest { server.enqueue(MockResponse(body = "abc")) val call = client.newCall(request) call.executeAsync().use { withContext(Dispatchers.IO) { assertThat(it.body.string()).isEqualTo("abc") } } } } @Test fun timeoutCall() { runTest { server.enqueue(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 5.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt
client.newCall(requestWithUpgrade).execute() } } @Test fun upgradesOnReusedConnection() { server.enqueue(MockResponse(body = "normal request")) client.newCall(Request(server.url("/"))).execute().use { response -> assertThat(response.body.string()).isEqualTo("normal request") } upgrade() assertThat(server.takeRequest().connectionIndex).isEqualTo(0)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 7.1K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
.setHeader("content-type", "text/event-stream") .body("data: hey\n\n") .build(), ) newEventSource() listener.assertFailure("timeout") } @Test fun retainsAccept() { server.enqueue( MockResponse .Builder() .body( """ |data: hey | | """.trimMargin(),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 8.1K bytes - Viewed (0) -
docs/de/docs/tutorial/request-forms-and-files.md
/// warning | Achtung Sie können mehrere `File`- und `Form`-Parameter in einer *Pfadoperation* deklarieren, aber Sie können nicht gleichzeitig auch `Body`-Felder deklarieren, welche Sie als JSON erwarten, da der Request den Body mittels `multipart/form-data` statt `application/json` kodiert. Das ist keine Limitation von **FastAPI**, sondern Teil des HTTP-Protokolls. /// ## Zusammenfassung
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartReader.kt
closed = true currentPart = null source.close() } /** A single part in a multipart body. */ class Part( @get:JvmName("headers") val headers: Headers, @get:JvmName("body") val body: BufferedSource, ) : Closeable by body internal companion object { /** These options follow the boundary. */ val afterBoundaryOptions = Options.of(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 02:11:14 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt
assertFailsWith<IOException> { response.body.source().readUtf8() }.also { expected -> assertThat(expected.message).isEqualTo("timeout") assertThat(call.isCanceled()).isTrue() } } @Test fun timeoutReadingResponseWithEnqueue() { server.enqueue( MockResponse .Builder() .body(BIG_ENOUGH_BODY) .build(), ) val request =
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 10.6K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/CompressionInterceptor.kt
if (!response.promisesBody()) { return response } val body = response.body val encoding = response.header("Content-Encoding") ?: return response val algorithm = lookupDecompressor(encoding) ?: return response val decompressedSource = algorithm.decompress(body.source()).buffer() return response .newBuilder() .removeHeader("Content-Encoding")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 3.2K bytes - Viewed (1) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseCommonTest.kt
).protocol(Protocol.HTTP_1_1) .code(200) .message("OK") .build() assertThat(response.body.contentType()).isNull() assertThat(response.body.contentLength()).isEqualTo(0L) assertThat(response.body.byteString()).isEqualTo(EMPTY) } /** * Returns a new response body that refuses to be read once it has been closed. This is true of * most [BufferedSource] instances, but not of [Buffer]. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.6K bytes - Viewed (0) -
docs/en/docs/tutorial/request-forms-and-files.md
/// warning You can declare multiple `File` and `Form` parameters in a *path operation*, but you can't also declare `Body` fields that you expect to receive as JSON, as the request will have the body encoded using `multipart/form-data` instead of `application/json`. This is not a limitation of **FastAPI**, it's part of the HTTP protocol. /// ## Recap { #recap }
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 1.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyJvmTest.kt
class ResponseBodyJvmTest { @Test fun stringEmpty() { val body = body("") assertThat(body.string()).isEqualTo("") } @Test fun stringLooksLikeBomButTooShort() { val body = body("000048") assertThat(body.string()).isEqualTo("\u0000\u0000H") } @Test fun stringDefaultsToUtf8() { val body = body("68656c6c6f") assertThat(body.string()).isEqualTo("hello") } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 12.4K bytes - Viewed (0)