- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 386 for body (0.21 sec)
-
docs/pt/docs/tutorial/body-nested-models.md
### Defina um sub-modelo Por exemplo, nós podemos definir um modelo `Image`: ```Python hl_lines="9-11" {!../../../docs_src/body_nested_models/tutorial004.py!} ``` ### Use o sub-modelo como um tipo E então podemos usa-lo como o tipo de um atributo: ```Python hl_lines="20" {!../../../docs_src/body_nested_models/tutorial004.py!} ``` Isso significa que o **FastAPI** vai esperar um corpo similar à: ```JSON {
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
requestBody2.writeUtf8("request body\n") requestBody2.close() val responseBody2 = response2.body.source() assertThat(responseBody2.readUtf8Line()) .isEqualTo("response body") assertTrue(responseBody2.exhausted()) body.awaitSuccess() // No more requests attempted! (call.request().body as AsyncRequestBody?)!!.assertNoMoreSinks() }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 108.6K bytes - Viewed (0) -
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
this.server = server } @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(
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Apr 18 01:24:38 GMT 2024 - 5.4K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
But because of our changes in `GzipRequest.body`, the request body will be automatically decompressed when it is loaded by **FastAPI** when needed. ## Accessing the request body in an exception handler !!! tip To solve this same problem, it's probably a lot easier to use the `body` in a custom handler for `RequestValidationError` ([Handling Errors](../tutorial/handling-errors.md#use-the-requestvalidationerror-body){.internal-link target=_blank}).
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 4.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
""".trimMargin(), ) } override fun timeout() = Timeout.NONE override fun close() { } } fun Response.stripBody(): Response { return newBuilder() .body(UnreadableResponseBody(body.contentType(), body.contentLength())) .build() } val Response.commonIsSuccessful: Boolean get() = code in 200..299 fun Response.commonHeaders(name: String): List<String> = headers.values(name)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Apr 15 13:24:48 GMT 2024 - 5.2K 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(),
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 6.6K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
if (!response.isSuccessful) { listener.onFailure(this, null, response) return } val body = response.body if (!body.isEventStream()) { listener.onFailure( this, IllegalStateException("Invalid content-type: ${body.contentType()}"), response, ) return }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/EventListener.kt
* body. This was misleading for tracing because it was too early. */ open fun responseBodyStart(call: Call) { } /** * Invoked immediately after receiving a response body and completing reading it. * * Will only be invoked for requests having a response body e.g. won't be invoked for a web socket * upgrade. *
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 15.2K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
val body = response.body ?: return sleepNanos(response.bodyDelayNanos) val responseBodySink = sink.withThrottlingAndSocketPolicy( policy = response, disconnectHalfway = response.socketPolicy == DisconnectDuringResponseBody, expectedByteCount = body.contentLength, socket = socket, ).buffer() body.writeTo(responseBodySink)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 37.4K bytes - Viewed (0)