mirror of
https://github.com/fastapi/fastapi.git
synced 2026-11-21 02:03:39 +08:00
9 lines
186 B
Python
9 lines
186 B
Python
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(x_token: list[str] | None = Header(default=None)):
|
|
return {"X-Token values": x_token}
|