mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-30 09:39:20 -05:00
9 lines
174 B
Python
9 lines
174 B
Python
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(user_agent: str | None = Header(None)):
|
|
return {"User-Agent": user_agent}
|