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 parameters:
- F
The effect type constructor.
- Companion:
- object
Value members
Abstract methods
- Type parameters:
- B
The interpreter-specific, low-level type of body.
- R
The interpreter-specific supported capabilities, such as streaming support, websockets or
Any
.