Defines the contract for a middleware intercepting requests before they are sent (but after the RequestContext was created) and before the ResponseContext is unwrapped.

interface Middleware {
    post(context: ResponseContext): Promise<ResponseContext>;
    pre(context: RequestContext): Promise<RequestContext>;
}

Methods

Methods