I imagine you would do this with an interceptor. An interceptor has two stages, incoming and outgoing (don't remember proper terms from memory).
@ariel.silverman, sorry to hear you ran into issues. The documentation is a continual work in progress. Creating an issue in the pedestal-docs repo would be helpful in prioritizing what gets updated when. PRs are always welcome and appreciated! https://github.com/pedestal/pedestal-docs.