A RoutesMiddleware defines the middleware implementation for a given
EndpointMiddleware. These middleware are defined by a pair of functions,
referred to as incoming interceptor and outgoing interceptor, which are
applied to incoming requests and outgoing responses.
The incoming interceptor is responsible for taking the input to the
middleware, derived from the request according to the definition of the
middleware, and either failing, or producing a state value, which will be
passed with the outgoing interceptor.
The incoming interceptor is responsible for taking the input to the
middleware, derived from the request according to the definition of the
middleware, and either failing, or producing a state value, which will be
passed with the outgoing interceptor.
The outgoing interceptor is responsible for taking the state value produced
by the incoming interceptor, and either failing, or producing an output
value, which will be used to patch the response.
The outgoing interceptor is responsible for taking the state value produced
by the incoming interceptor, and either failing, or producing an output
value, which will be used to patch the response.