mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-30 09:39:20 -05:00
11 lines
210 B
Python
11 lines
210 B
Python
from typing import Optional
|
|
|
|
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(x_token: Optional[list[str]] = Header(None)):
|
|
return {"X-Token values": x_token}
|