OnRequest
OnRequest is a term used in web application frameworks to describe an early lifecycle hook that runs when an HTTP request is received. It represents one of the initial points where server-side code can observe and influence the processing of a request, before routing, authentication, or business logic executes.
In many frameworks, onRequest handlers fire immediately after the server accepts a connection but before most
A key aspect of onRequest is that a handler can terminate the normal processing chain by returning
Variations exist across frameworks; the hook may be named onRequest or have a similar extension point with
Related concepts include middleware, which often operates later in the request lifecycle, and other lifecycle hooks