Filters can be used to modify an incoming request, return an error, or return a response prior to the request reaching an endpoint.
pr_filter(pr, name, expr, serializer)
A Plumber API. Note: The supplied Plumber API object will also be updated in place as well as returned by the function.
A character string. Name of filter
An expr that resolve to a filter function or a filter function
A serializer function
The Plumber router with the defined filter added