mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 18:46:40 +00:00
10 lines
210 B
Python
10 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}
|