FastAPI除了Path、Query、RequestBody参数外,还有Cookie和Header参数 Cookie参数 使用Cookie参数,需要引用Cookie类 from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(*, ads_id: str = Cookie(None)): return