Defines the interceptor for a Response. This allows you to intercept responses before unmarshalling.

Adds a delay before sending the response:

const addDelayInterceptor: ResponseInterceptor = ({ response }) =>
new Promise(resolve => {
setTimeout(() => resolve(response), 1000)
})