Interceptor for next.
npm install -S @jswork/next-interceptor
import NxInterceptor from '@jswork/next-interceptor';
const intercetor = new NxInterceptor({
async: false,
items:[/* ... your intercetpros ... */]
});
// get response interceptor process data;
const reqData = intercetor.compose(data1, 'request');
const resData = intercetor.compose(data2, 'response');
Code released under the MIT license.