FastAPI returns JSON by default (serializing dicts, lists, and Pydantic models), but it supports many other response types for different needs — HTML, files, streams, redirects, and plain text — via the fastapi.responses classes.
The default and common response classes
fastapi.responses (
JSONResponse, HTMLResponse, PlainTextResponse,
RedirectResponse, FileResponse, StreamingResponse,
)
(): {: }
():
():
(): RedirectResponse(url=)
