mirror of
https://github.com/fastapi/fastapi.git
synced 2026-07-18 10:53:07 -04:00
📝 Add Cookie docs
This commit is contained in:
8
docs/tutorial/src/cookie-params/tutorial001.py
Normal file
8
docs/tutorial/src/cookie-params/tutorial001.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from fastapi import Cookie, FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/items/")
|
||||
async def read_items(*, ads_id: str = Cookie(None)):
|
||||
return {"ads_id": ads_id}
|
||||
Reference in New Issue
Block a user