diff --git a/docs_src/middleware/tutorial001.py b/docs_src/middleware/tutorial001.py index e65a7dade..1266772c5 100644 --- a/docs_src/middleware/tutorial001.py +++ b/docs_src/middleware/tutorial001.py @@ -12,3 +12,8 @@ async def add_process_time_header(request: Request, call_next): process_time = time.perf_counter() - start_time response.headers["X-Process-Time"] = str(process_time) return response + + +@app.get("/") +def hello(): + return {"hello": "world"}