mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-25 07:08:11 -05:00
10 lines
237 B
Python
10 lines
237 B
Python
from fastapi import FastAPI
|
|
from fastapi.responses import RedirectResponse
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/pydantic", response_class=RedirectResponse, status_code=302)
|
|
async def redirect_pydantic():
|
|
return "https://docs.pydantic.dev/"
|