code: function getHeaders(authRequired = false) {
      if (!authRequired)
          return exports.basicHeaders;
      if ((!('X-Auth-Token' in exports.authHeaders) || !('X-User-Id' in exports.authHeaders)) ||
          exports.authHeaders['X-Auth-Token'] === '' ||
          exports.authHeaders['X-User-Id'] === '') {
          throw new Error('Auth required endpoint cannot be called before login');
      }
      return Object.assign({}, exports.basicHeaders, exports.authHeaders);
  }
docs: Join basic headers with auth headers if required