Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vue_resource_helper.js « helpers « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0f58af09933bbf9e23a34d30dbb248e12b2fa4f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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;
  });
};