gitlab-org--gitlab-foss/spec/javascripts/helpers/vue_resource_helper.js
2017-07-12 14:47:09 +00:00

11 lines
333 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;
});
};