mirror of
https://github.com/fastapi/fastapi.git
synced 2026-11-22 17:25:44 +08:00
9 lines
185 B
Python
9 lines
185 B
Python
from fastapi import FastAPI, Header
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(*, accept_encoding: str = Header(None)):
|
|
return {"Accept-Encoding": accept_encoding}
|