Coverage for docs_src/custom_response/tutorial006c.py: 100%
6 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
1from fastapi import FastAPI 1abcde
2from fastapi.responses import RedirectResponse 1abcde
4app = FastAPI() 1abcde
7@app.get("/pydantic", response_class=RedirectResponse, status_code=302) 1abcde
8async def redirect_pydantic(): 1abcde
9 return "https://docs.pydantic.dev/" 1abcde