- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for process_item (0.1 sec)
-
docs_src/middleware/tutorial001.py
@app.middleware("http") async def add_process_time_header(request: Request, call_next): start_time = time.perf_counter() response = await call_next(request) process_time = time.perf_counter() - start_time response.headers["X-Process-Time"] = str(process_time)
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 13:46:39 UTC 2024 - 365 bytes - Viewed (0) -
fastapi/applications.py
async def add_process_time_header(request: Request, call_next): start_time = time.time() response = await call_next(request) process_time = time.time() - start_time response.headers["X-Process-Time"] = str(process_time) return response ``` """ def decorator(func: DecoratedCallable) -> DecoratedCallable:
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:52:31 UTC 2024 - 172.2K bytes - Viewed (0)