- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for RedirectResponse (0.21 sec)
-
docs/en/docs/reference/responses.md
You can import them directly from `fastapi.responses`: ```python from fastapi.responses import ( FileResponse, HTMLResponse, JSONResponse, ORJSONResponse, PlainTextResponse, RedirectResponse, Response, StreamingResponse, UJSONResponse, ) ``` ## FastAPI Responses There are a couple of custom FastAPI response classes, you can use them to optimize JSON performance.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
{!../../../docs_src/custom_response/tutorial001.py!} ``` !!! tip It's possible that `ORJSONResponse` might be a faster alternative. ### `RedirectResponse` Returns an HTTP redirect. Uses a 307 status code (Temporary Redirect) by default. You can return a `RedirectResponse` directly: ```Python hl_lines="2 9" {!../../../docs_src/custom_response/tutorial006.py!} ``` ---
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/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!} ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17.9K bytes - Viewed (0) -
docs/en/docs/release-notes.md
## 0.66.0 ### Features
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Apr 28 00:28:00 GMT 2024 - 385.5K bytes - Viewed (1)