Answers for "multi query set"

0

multi query set

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
Posted by: Guest on October-28-2021

Browse Popular Code Answers by Language