Sync fastapi docs from 11614be9 on 2026-03-11
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/headers/")
|
||||
def get_headers():
|
||||
content = {"message": "Hello World"}
|
||||
headers = {"X-Cat-Dog": "alone in the world", "Content-Language": "en-US"}
|
||||
return JSONResponse(content=content, headers=headers)
|
||||
Reference in New Issue
Block a user