- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for directed (0.17 sec)
-
docs/fr/docs/advanced/response-directly.md
Pour ces cas, vous pouvez spécifier un appel à `jsonable_encoder` pour convertir vos données avant de les passer à une réponse : ```Python hl_lines="6-7 21-22" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "Détails techniques" Vous pouvez aussi utiliser `from starlette.responses import JSONResponse`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.6K bytes - Viewed (0) -
docs/de/docs/advanced/response-directly.md
In diesen Fällen können Sie den `jsonable_encoder` verwenden, um Ihre Daten zu konvertieren, bevor Sie sie an eine Response übergeben: ```Python hl_lines="6-7 21-22" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "Technische Details" Sie können auch `from starlette.responses import JSONResponse` verwenden.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:19:36 GMT 2024 - 3.5K bytes - Viewed (0) -
docs/en/docs/advanced/response-directly.md
But you can return a `JSONResponse` directly from your *path operations*. It might be useful, for example, to return custom headers or cookies. ## Return a `Response` In fact, you can return any `Response` or any sub-class of it. !!! tip `JSONResponse` itself is a sub-class of `Response`. And when you return a `Response`, **FastAPI** will pass it directly.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 29 14:02:58 GMT 2020 - 3K bytes - Viewed (0) -
docs/em/docs/advanced/response-directly.md
📚 💼, 👆 💪 ⚙️ `jsonable_encoder` 🗜 👆 📊 ⏭ 🚶♀️ ⚫️ 📨: ```Python hl_lines="6-7 21-22" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "📡 ℹ" 👆 💪 ⚙️ `from starlette.responses import JSONResponse`. **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 2.6K bytes - Viewed (0) -
docs/es/docs/advanced/response-directly.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 13 11:57:27 GMT 2024 - 3.2K bytes - Viewed (0) -
docs/zh/docs/advanced/response-directly.md
例如,如果不首先将 Pydantic 模型转换为 `dict`,并将所有数据类型(如 `datetime`、`UUID` 等)转换为兼容 JSON 的类型,则不能将其放入JSONResponse中。 对于这些情况,在将数据传递给响应之前,你可以使用 `jsonable_encoder` 来转换你的数据。 ```Python hl_lines="4 6 20 21" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "技术细节" 你也可以使用 `from starlette.responses import JSONResponse`。 出于方便,**FastAPI** 会提供与 `starlette.responses` 相同的 `fastapi.responses` 给开发者。但是大多数可用的响应都直接来自 Starlette。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 3.1K bytes - Viewed (0) -
docs/ja/docs/advanced/response-directly.md
例えば、Pydanticモデルを `JSONResponse` に含めるには、すべてのデータ型 (`datetime` や `UUID` など) をJSON互換の型に変換された `dict` に変換しなければなりません。 このようなケースでは、レスポンスにデータを含める前に `jsonable_encoder` を使ってデータを変換できます。 ```Python hl_lines="6-7 21-22" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "技術詳細" また、`from starlette.responses import JSONResponse` も利用できます。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Nov 05 22:50:38 GMT 2020 - 3.6K bytes - Viewed (0)