RequestInterceptor
Allows intercepting the handling of request
, before decoding using any of the endpoints is done. The request
can be modified, before invoking further behavior, passed through requestHandler
. Ultimately, when all
interceptors are run, logic decoding subsequent endpoint inputs will be run.
A request interceptor is called once for a request.
Instead of calling the nested behavior, alternative responses can be returned using the responder
.
Moreover, when calling requestHandler
, an EndpointInterceptor can be provided, which will be added to the list
of endpoint interceptors to call. The order in which the endpoint interceptors will be called will correspond to
their order in the interceptors list in the server options. An "empty" interceptor can be provided using
EndpointInterceptor.noop.
- Type Params
- B
The interpreter-specific, low-level type of body.
- F
The effect type constructor.