2017-09-10 17:25:29 +05:30
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
|
export const headersInterceptor = (request, next) => {
|
2018-12-13 13:39:08 +05:30
|
|
|
next(response => {
|
2017-09-10 17:25:29 +05:30
|
|
|
const headers = {};
|
|
|
|
response.headers.forEach((value, key) => {
|
|
|
|
headers[key] = value;
|
|
|
|
});
|
2018-11-20 20:47:30 +05:30
|
|
|
// eslint-disable-next-line no-param-reassign
|
2017-09-10 17:25:29 +05:30
|
|
|
response.headers = headers;
|
|
|
|
});
|
|
|
|
};
|