- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 13 for response_class (0.07 seconds)
-
docs/en/docs/advanced/custom-response.md
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTML Response { #html-response } To return a response with HTML directly from **FastAPI**, use `HTMLResponse`. * Import `HTMLResponse`. * Pass `HTMLResponse` as the parameter `response_class` of your *path operation decorator*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 11K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/custom-response.md
簡而言之,若你想要最佳效能,請使用[回應模型](../tutorial/response-model.md),並且不要在「路徑操作裝飾器」中宣告 `response_class`。 {* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTML 回應 { #html-response } 要直接從 **FastAPI** 回傳 HTML,使用 `HTMLResponse`。 - 匯入 `HTMLResponse`。 - 在「路徑操作裝飾器」中,將 `HTMLResponse` 傳給 `response_class` 參數。 {* ../../docs_src/custom_response/tutorial002_py310.py hl[2,7] *} /// infoCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.3K bytes - Click Count (0) -
docs/ko/docs/advanced/custom-response.md
`JSONResponse`처럼 JSON 미디어 타입(`application/json`)을 가진 `response_class`를 선언하면, 여러분이 *경로 처리 데코레이터*에서 선언한 Pydantic의 `response_model`로 데이터가 자동 변환(및 필터링)됩니다. 하지만 데이터의 JSON 바이트 직렬화 자체는 Pydantic이 수행하지 않고, `jsonable_encoder`로 변환한 후 `JSONResponse` 클래스에 전달하며, 그 클래스가 Python 표준 JSON 라이브러리를 사용해 바이트로 직렬화합니다. ### JSON 성능 { #json-performance } 요약하면, 최대 성능이 필요하다면 [응답 모델](../tutorial/response-model.md)을 사용하고, *경로 처리 데코레이터*에 `response_class`를 선언하지 마세요.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 12.4K bytes - Click Count (0) -
docs/ja/docs/advanced/custom-response.md
結論として、最大のパフォーマンスを得たい場合は、[レスポンスモデル](../tutorial/response-model.md) を使い、*path operation デコレータ* で `response_class` は宣言しないでください。 {* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTMLレスポンス { #html-response } **FastAPI** からHTMLを直接返すには、`HTMLResponse` を使います。 * `HTMLResponse` をインポートする * *path operation デコレータ* のパラメータ `response_class` に `HTMLResponse` を渡す {* ../../docs_src/custom_response/tutorial002_py310.py hl[2,7] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 13.5K bytes - Click Count (0) -
docs/tr/docs/advanced/custom-response.md
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTML Response { #html-response } **FastAPI**’den doğrudan HTML içeren bir response döndürmek için `HTMLResponse` kullanın. * `HTMLResponse` import edin. * *path operation decorator*’ınızın `response_class` parametresi olarak `HTMLResponse` verin.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 11.9K bytes - Click Count (0) -
docs/es/docs/advanced/custom-response.md
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## Response HTML { #html-response } Para devolver un response con HTML directamente desde **FastAPI**, usa `HTMLResponse`. * Importa `HTMLResponse`. * Pasa `HTMLResponse` como parámetro `response_class` de tu *path operation decorator*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 11.6K bytes - Click Count (0) -
docs/de/docs/advanced/custom-response.md
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTML-Response { #html-response } Um eine Response mit HTML direkt von **FastAPI** zurückzugeben, verwenden Sie `HTMLResponse`. * Importieren Sie `HTMLResponse`. * Übergeben Sie `HTMLResponse` als den Parameter `response_class` Ihres *Pfadoperation-Dekorators*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 12.5K bytes - Click Count (0) -
docs/zh/docs/advanced/custom-response.md
如果你在 `response_class` 中声明了一个 JSON 媒体类型(`application/json`)的类(比如 `JSONResponse`),你返回的数据会使用你在 *路径操作装饰器* 中声明的任意 Pydantic `response_model` 自动转换(和过滤)。但数据不会由 Pydantic 序列化为 JSON 字节;而是先用 `jsonable_encoder` 转换后传给 `JSONResponse`,由它使用 Python 标准 JSON 库序列化为字节。 ### JSON 性能 { #json-performance } 简而言之,如果你想要获得最大性能,请使用[响应模型](../tutorial/response-model.md),并且不要在 *路径操作装饰器* 中声明 `response_class`。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.4K bytes - Click Count (0) -
docs/ru/docs/advanced/custom-response.md
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTML-ответ { #html-response } Чтобы вернуть ответ с HTML напрямую из **FastAPI**, используйте `HTMLResponse`. - Импортируйте `HTMLResponse`. - Передайте `HTMLResponse` в параметр `response_class` вашего декоратора операции пути.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 17.6K bytes - Click Count (0) -
docs/uk/docs/advanced/custom-response.md
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTML-відповідь { #html-response } Щоб повернути відповідь із HTML безпосередньо з **FastAPI**, використовуйте `HTMLResponse`. - Імпортуйте `HTMLResponse`. - Передайте `HTMLResponse` як параметр `response_class` вашого декоратора операції шляху.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 17K bytes - Click Count (0)