code: function setXHRConfig (req, config) {
    try {
      req.withCredentials = config.http.withCredentials;
    }
    catch (err) {
      // Some browsers don't allow `withCredentials` to be set for synchronous requests
    }
  
    try {
      req.timeout = config.http.timeout;
    }
    catch (err) {
      // Some browsers don't allow `timeout` to be set for synchronous requests
    }
  
    // Set request headers
    Object.keys(config.http.headers).forEach(function (key) {
      var value = config.http.headers[key];
      if (value !== undefined) {
        req.setRequestHeader(key, value);
      }
    });
  }
docs: Sets the XMLHttpRequest properties, per the specified configuration.
  
  @param {XMLHttpRequest} req
  @param {Config} config