mirror of
https://github.com/fastapi/fastapi.git
synced 2026-01-15 17:40:03 -05:00
* 📝 Document multi-value query parameters * ✨ Document and test multiple query values * ✨ Document receiving duplicate headers
12 lines
199 B
Python
12 lines
199 B
Python
from typing import List
|
|
|
|
from fastapi import FastAPI, Query
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(q: List[str] = Query(None)):
|
|
query_items = {"q": q}
|
|
return query_items
|