- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for 27 (0.15 sec)
-
docs/zh/docs/advanced/custom-response.md
例如,如果你需要压榨性能,你可以安装并使用 <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> 并将响应设置为 `ORJSONResponse`。 导入你想要使用的 `Response` 类(子类)然后在 *路径操作装饰器* 中声明它。 ```Python hl_lines="2 7" {!../../../docs_src/custom_response/tutorial001b.py!} ``` !!! info "提示" 参数 `response_class` 也会用来定义响应的「媒体类型」。 在这个例子中,HTTP 头的 `Content-Type` 会被设置成 `application/json`。 并且在 OpenAPI 文档中也会这样记录。
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 7.8K bytes - Viewed (1) -
docs/de/docs/advanced/custom-response.md
```Python hl_lines="2 7" {!../../../docs_src/custom_response/tutorial001b.py!} ``` !!! info Der Parameter `response_class` wird auch verwendet, um den „Medientyp“ der Response zu definieren.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 23 13:05:12 GMT 2024 - 13.5K bytes - Viewed (0) -
docs/ja/docs/advanced/custom-response.md
例えば、パフォーマンスを出したい場合は、<a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>をインストールし、`ORJSONResponse`をレスポンスとしてセットすることができます。 使いたい `Response` クラス (サブクラス) をインポートし、 *path operationデコレータ* に宣言します。 ```Python hl_lines="2 7" {!../../../docs_src/custom_response/tutorial001b.py!} ``` !!! info "情報" パラメータ `response_class` は、レスポンスの「メディアタイプ」を定義するために利用することもできます。 この場合、HTTPヘッダー `Content-Type` には `application/json` がセットされます。
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Jul 19 19:14:58 GMT 2021 - 10.7K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.7K bytes - Viewed (0) -
docs/em/docs/advanced/custom-response.md
✋️ 🚥 👆 🎯 👈 🎚 👈 👆 🛬 **🎻 ⏮️ 🎻**, 👆 💪 🚶♀️ ⚫️ 🔗 📨 🎓 & ❎ ➕ 🌥 👈 FastAPI 🔜 ✔️ 🚶♀️ 👆 📨 🎚 🔘 `jsonable_encoder` ⏭ 🚶♀️ ⚫️ 📨 🎓. ```Python hl_lines="2 7" {!../../../docs_src/custom_response/tutorial001b.py!} ``` !!! info 🔢 `response_class` 🔜 ⚙️ 🔬 "📻 🆎" 📨. 👉 💼, 🇺🇸🔍 🎚 `Content-Type` 🔜 ⚒ `application/json`. & ⚫️ 🔜 📄 ✅ 🗄.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 9.8K bytes - Viewed (0)