mirror of
https://github.com/fastapi/fastapi.git
synced 2026-11-09 01:23:17 -05:00
11 lines
221 B
Python
11 lines
221 B
Python
from typing import Annotated
|
|
|
|
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(x_token: Annotated[list[str] | None, Header()] = None):
|
|
return {"X-Token values": x_token}
|