debian-mirror-gitlab/spec/javascripts/helpers/vue_resource_helper.js

12 lines
333 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
// 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;
});
};