📝 Add docs for Form data

This commit is contained in:
Sebastián Ramírez
2018-12-15 11:36:23 +04:00
parent 99c7ebdb6b
commit e5725d2af1
3 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
from fastapi import FastAPI, Form
app = FastAPI()
@app.post("/login/")
async def login(*, username: str = Form(...), password: str = Form(...)):
return {"username": username}