Files
fastapi/docs/src/response_status_code/tutorial001.py
2019-01-14 17:30:55 +04:00

9 lines
145 B
Python

from fastapi import FastAPI
app = FastAPI()
@app.post("/items/", status_code=201)
async def create_item(name: str):
return {"name": name}