mirror of
https://github.com/fastapi/fastapi.git
synced 2026-11-21 10:13:53 +08:00
9 lines
170 B
Python
9 lines
170 B
Python
from fastapi import Cookie, FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(ads_id: str | None = Cookie(default=None)):
|
|
return {"ads_id": ads_id}
|