📅  最后修改于: 2022-03-11 15:00:30.743000             🧑  作者: Mango
from typing import List, Optional
from fastapi import FastAPI, Query
app = FastAPI()
@app.get("/items/")
async def read_items(q: Optional[List[str]] = Query(None)):
query_items = {"q": q}
return query_items