mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-18 13:27:45 -04:00
✨ Allow setting the response_class to RedirectResponse and returning the URL from the function (#3457)
This commit is contained in:
committed by
GitHub
parent
ea8d7f689e
commit
dc5a966548
@@ -5,5 +5,5 @@ app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/typer")
|
||||
async def read_typer():
|
||||
async def redirect_typer():
|
||||
return RedirectResponse("https://typer.tiangolo.com")
|
||||
|
||||
Reference in New Issue
Block a user