code: function () {
      if (req.readyState !== 4) return;
      if (req.status === 200) successCb(null, JSON.parse(req.responseText));
      else {
        var err = { error: 'Sorry, an error ocurred on the server' };
  
        if (errorCb && typeof errorCb === 'function') return errorCb(err);
        successCb(err, null);
      }
    }
docs: XMLHttpRequest onload