Browse Source

docs_src/middleware/tutorial001.py: source code updated

pull/13525/head
alv2017 2 weeks ago
parent
commit
a79c69843e
  1. 5
      docs_src/middleware/tutorial001.py

5
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"}

Loading…
Cancel
Save