Files
fastapi/docs/src/custom_response/tutorial001.py
2019-04-26 13:11:16 +04:00

10 lines
199 B
Python

from fastapi import FastAPI
from starlette.responses import UJSONResponse
app = FastAPI()
@app.get("/items/", response_class=UJSONResponse)
async def read_items():
return [{"item_id": "Foo"}]