Core
withInterceptors
Appends interceptors to the client interceptor chain.
@defjs/core · Function
Signature
function withInterceptors(...interceptors: Interceptor[]): ClientOption;
Calling it again appends more; it never replaces earlier ones. The first registered interceptor is the outermost layer. HTTP, SSE, and WebSocket interceptors can be mixed in one call. When an operation runs, only the interceptors of that transport run, in their registration order.
Parameters
Prop
Type
...interceptors? Interceptor[]Interceptors applied in registration order.
Returns
An option that pushes onto config.interceptors.