Reading · 9 min
What happens when a request arrives
You are previewing a free lesson. Enrol to save progress and take quizzes.
A request arrives with a method, a path, headers and sometimes a body. The server routes it to a handler, which validates input, applies business rules, talks to the database and returns a response with a status code.
Keeping these steps separate, routing, validation, logic and data access, makes code easier to test and change.
