- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for RedirectResponse (0.28 sec)
-
docs_src/response_model/tutorial003_05_py310.py
from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal", response_model=None) async def get_portal(teleport: bool = False) -> Response | dict: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 373 bytes - Viewed (0) -
docs_src/custom_response/tutorial006c.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/pydantic", response_class=RedirectResponse, status_code=302) async def redirect_pydantic():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 237 bytes - Viewed (0) -
docs_src/response_model/tutorial003_04.py
from typing import Union from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal") async def get_portal(teleport: bool = False) -> Union[Response, dict]: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 384 bytes - Viewed (0) -
docs_src/response_model/tutorial003_03.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/teleport") async def get_teleport() -> RedirectResponse:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 241 bytes - Viewed (0) -
docs_src/custom_response/tutorial006.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/typer") async def redirect_typer():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Jul 03 19:51:28 GMT 2021 - 199 bytes - Viewed (0) -
docs_src/custom_response/tutorial006b.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/fastapi", response_class=RedirectResponse) async def redirect_fastapi():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Jul 03 19:51:28 GMT 2021 - 220 bytes - Viewed (0) -
docs_src/response_model/tutorial003_02.py
from fastapi import FastAPI, Response from fastapi.responses import JSONResponse, RedirectResponse app = FastAPI() @app.get("/portal") async def get_portal(teleport: bool = False) -> Response: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 381 bytes - Viewed (0) -
docs_src/response_model/tutorial003_04_py310.py
from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal") async def get_portal(teleport: bool = False) -> Response | dict: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 352 bytes - Viewed (0) -
docs_src/response_model/tutorial003_05.py
from typing import Union from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal", response_model=None) async def get_portal(teleport: bool = False) -> Union[Response, dict]: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 405 bytes - Viewed (0) -
fastapi/responses.py
from starlette.responses import JSONResponse as JSONResponse # noqa from starlette.responses import PlainTextResponse as PlainTextResponse # noqa from starlette.responses import RedirectResponse as RedirectResponse # noqa from starlette.responses import Response as Response # noqa from starlette.responses import StreamingResponse as StreamingResponse # noqa try: import ujson
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 1.7K bytes - Viewed (0)