Request Lifecycle

Understanding Jetpath’s request lifecycle is essential for building efficient and maintainable applications. This document outlines the complete journey of a request from request to response.

Request Lifecycle

1. Request

When a request is received:

2. Pre-Handler Middleware

Before reaching the route handler, the request passes through pre-handler middleware:

3. Route Handler Execution

Once the request reaches the handler:

4. Post-Processing

Post-Handler Middleware

After the handler executes, the response passes through post-handler middleware:

Error Handling

Error handling is integrated throughout the lifecycle: