mirror of
https://github.com/fastapi/fastapi.git
synced 2026-07-14 17:03:09 -04:00
📝 Add docs for Form data
This commit is contained in:
8
docs/tutorial/src/form-data/tutorial001.py
Normal file
8
docs/tutorial/src/form-data/tutorial001.py
Normal 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}
|
||||
Reference in New Issue
Block a user