Within a web application, a request message is ingested and a response is produced, as has been reinforced in prior chapters. Typically, within handlers, there are fairly common tasks associated with the ingest of a request. Common request tasks include request body parsing and data binding, logging of requests, validating request authentication and session management, and request metadata creation. Conversely, common response-related tasks include request body rendering, as well as graceful error and panic handling. When you start looking at the common overhead associated with handling a request and generating a response, you can start seeing potential reuse cases.
As a concrete example, we have two handlers, CreateReminder and GetReminder, which parse requests, validate that the user's session is authentic and valid, perform request pedigree...