code: function parseHeaders(xhr) {
    const pairs = xhr.getAllResponseHeaders().trim().split('\n');
    const headers = {};
    pairs.forEach((header) => {
      const split = header.trim().split(':');
      const key = split.shift().trim().toLowerCase();
      const value = split.join(':').trim();
      headers[key] = value;
    });
    return headers;
  }
docs: 3 minutes (twice the default sync period)