debian-mirror-gitlab/spec/javascripts/helpers/vue_resource_helper.js
2018-12-13 13:39:08 +05:30

11 lines
331 B
JavaScript

// eslint-disable-next-line import/prefer-default-export
export const headersInterceptor = (request, next) => {
next(response => {
const headers = {};
response.headers.forEach((value, key) => {
headers[key] = value;
});
// eslint-disable-next-line no-param-reassign
response.headers = headers;
});
};