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