pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
10 lines
205 B
10 lines
205 B
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}
|
|
|