- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 2,066 for Response_ (0.35 sec)
-
docs/es/docs/advanced/response-directly.md
``` !!! note "Detalles Técnicos" También puedes usar `from starlette.responses import JSONResponse`. **FastAPI** provee `starlette.responses` como `fastapi.responses`, simplemente como una conveniencia para ti, el desarrollador. Pero la mayoría de las respuestas disponibles vienen directamente de Starlette. ## Devolviendo una `Response` personalizada
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Jan 13 11:57:27 UTC 2024 - 3.2K bytes - Viewed (0) -
docs/zh/docs/advanced/additional-responses.md
## 组合信息 您还可以联合接收来自多个位置的响应信息,包括 `response_model `、 `status_code` 和 `responses `参数。 您可以使用默认的状态码 `200` (或者您需要的自定义状态码)声明一个 `response_model `,然后直接在OpenAPI模式中在 `responses` 中声明相同响应的其他信息。 **FastAPI**将保留来自 `responses` 的附加信息,并将其与模型中的JSON Schema结合起来。 例如,您可以使用状态码 `404` 声明响应,该响应使用`Pydantic`模型并具有自定义的` description` 。
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Jan 09 15:53:39 UTC 2024 - 8.2K bytes - Viewed (0) -
internal/http/response-recorder.go
"fmt" "io" "net" "net/http" "time" ) // ResponseRecorder - is a wrapper to trap the http response // status code and to record the response body type ResponseRecorder struct { http.ResponseWriter io.ReaderFrom StatusCode int // Log body of 4xx or 5xx responses LogErrBody bool // Log body of all responses LogAllBody bool TimeToFirstByte time.Duration StartTime time.Time
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 02 00:13:19 UTC 2023 - 4.9K bytes - Viewed (0) -
docs/de/docs/tutorial/response-status-code.md
* Ein spezieller Fall ist `204`, „No Content“ („Kein Inhalt“). Diese Response wird verwendet, wenn es keinen Inhalt gibt, der zum Client zurückgeschickt wird, diese Response hat also keinen Body. * **`300`** und darüber steht für „Redirection“ („Umleitung“). Responses mit diesen Statuscodes können einen oder keinen Body haben, mit Ausnahme von `304`, „Not Modified“ („Nicht verändert“), welche keinen haben darf.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 02:32:57 UTC 2024 - 4.7K bytes - Viewed (0) -
cmd/api-response.go
w.WriteHeader(statusCode) if response != nil { w.Write(response) } } // mimeType represents various MIME type used API responses. type mimeType string const ( // Means no response type. mimeNone mimeType = "" // Means response type is JSON. mimeJSON mimeType = "application/json" // Means response type is XML.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:31:51 UTC 2024 - 33.5K bytes - Viewed (0) -
docs/de/docs/reference/response.md
# `Response`-Klasse Sie können einen Parameter in einer *Pfadoperation-Funktion* oder einer Abhängigkeit als `Response` deklarieren und dann Daten für die Response wie Header oder Cookies festlegen. Diese können Sie auch direkt verwenden, um eine Instanz davon zu erstellen und diese von Ihren *Pfadoperationen* zurückzugeben. Sie können sie direkt von `fastapi` importieren: ```python from fastapi import Response ```
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 30 18:16:03 UTC 2024 - 451 bytes - Viewed (0) -
docs/de/docs/tutorial/response-model.md
Und Tools werden auch glücklich sein, weil sowohl `RedirectResponse` als auch `JSONResponse` Unterklassen von `Response` sind, die Typannotation ist daher korrekt. ### Eine Unterklasse von Response annotieren Sie können auch eine Unterklasse von `Response` in der Typannotation verwenden. ```Python hl_lines="8-9"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 30 20:26:58 UTC 2024 - 19.9K bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
And tools will also be happy because both `RedirectResponse` and `JSONResponse` are subclasses of `Response`, so the type annotation is correct. ### Annotate a Response Subclass You can also use a subclass of `Response` in the type annotation: ```Python hl_lines="8-9" {!> ../../../docs_src/response_model/tutorial003_03.py!} ```
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 17.9K bytes - Viewed (0) -
docs/en/docs/reference/response.md
# `Response` class You can declare a parameter in a *path operation function* or dependency to be of type `Response` and then you can set data for the response like headers or cookies. You can also use it directly to create an instance of it and return it from your *path operations*. You can import it directly from `fastapi`: ```python from fastapi import Response ```
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 397 bytes - Viewed (0) -
tests/test_openapi_separate_input_output_schemas.py
client_no = get_app_client(separate_input_output_schemas=False) response = client.post("/items/", json={"name": "Plumbus"}) response2 = client_no.post("/items/", json={"name": "Plumbus"}) assert response.status_code == response2.status_code == 200, response.text assert ( response.json() == response2.json() == {"name": "Plumbus", "description": None, "sub": None} )
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 18.4K bytes - Viewed (0)