The handler at its core, is what handles the incoming request for a specific route. It determines how the request will be “handled.” The configuration for the route plays a critical part in how the handler needs to behave, and since it’s tightly coupled, some configuration for the route needs to be taken into consideration.
When we specify a route for a request, for example, if you’re going to
download a file from
/downloads/<filename> then it is the handler that has all of the logic in it for finding the file in question in order to send it to the connecting client. The handler may also do several other things, like counting how many times the file has been downloaded, access control making sure not just anyone has access ...