Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for add_process_time_header (0.07 sec)

  1. fastapi/applications.py

            from typing import Awaitable, Callable
    
            from fastapi import FastAPI, Request, Response
    
            app = FastAPI()
    
    
            @app.middleware("http")
            async def add_process_time_header(
                request: Request, call_next: Callable[[Request], Awaitable[Response]]
            ) -> Response:
                start_time = time.time()
                response = await call_next(request)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 176.3K bytes
    - Viewed (0)
Back to top