mirror of
https://github.com/fastapi/fastapi.git
synced 2026-01-10 23:18:02 -05:00
* 📝 Document multi-value query parameters * ✨ Document and test multiple query values * ✨ Document receiving duplicate headers
11 lines
196 B
Python
11 lines
196 B
Python
from typing import List
|
|
|
|
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(x_token: List[str] = Header(None)):
|
|
return {"X-Token values": x_token}
|