pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
10 lines
228 B
10 lines
228 B
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(
|
|
strange_header: str | None = Header(default=None, convert_underscores=False),
|
|
):
|
|
return {"strange_header": strange_header}
|
|
|