mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-24 22:59:32 -05:00
13 lines
260 B
Python
13 lines
260 B
Python
from typing import Union
|
|
|
|
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(
|
|
strange_header: Union[str, None] = Header(default=None, convert_underscores=False),
|
|
):
|
|
return {"strange_header": strange_header}
|