Browse Source
* ➕ Add docs to default_response_class * ✅ create a tip * ✅ fixing the tip * 🚑 grammar * 📝 Update docs for default response class Co-authored-by: Sebastián Ramírez <[email protected]>pull/1576/head
committed by
GitHub
2 changed files with 24 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||
from fastapi import FastAPI |
|||
from fastapi.responses import ORJSONResponse |
|||
|
|||
app = FastAPI(default_response_class=ORJSONResponse) |
|||
|
|||
|
|||
@app.get("/items/") |
|||
async def read_items(): |
|||
return [{"item_id": "Foo"}] |
Loading…
Reference in new issue