code: function(response, resolver, callbackSuccess, callbackError) {
  
              //xhr = xhr.target || xhr || {};
              var statusCode = xhrSuccessStatus[response.status] || response.status,
                  statusType = Number(response.status.toString()[0]),
                  promiseResponse;
  
              var data = response.response;
              var headers = corbel.utils.keysToLowerCase(response.headers);
  
              if (statusType <= 3 && !response.error) {
  
                  if (response.response) {
                      data = request.parse(response.response, response.responseType, response.dataType);
                  }
  
                  if (callbackSuccess) {
                      callbackSuccess.call(this, data, statusCode, response.responseObject, headers);
                  }
  
                  promiseResponse = {
                      data: data,
                      status: statusCode,
                      headers: headers
                  };
  
                  promiseResponse[response.responseObjectType] = response.responseObject;
  
                  resolver.resolve(promiseResponse);
              } else {
  
                  var disconnected = response.error && response.status === 0;
                  statusCode = disconnected ? 0 : statusCode;
  
                  if (callbackError) {
                      callbackError.call(this, response.error, statusCode, response.responseObject, headers);
                  }
  
                  if (response.response) {
                      data = request.parse(response.response, response.responseType, response.dataType);
                  }
  
                  promiseResponse = {
                      data: data,
                      status: statusCode,
                      error: response.error,
                      headers: headers
                  };
  
                  promiseResponse[response.responseObjectType] = response.responseObject;
  
                  resolver.reject(promiseResponse);
              }
          }
docs: Process server response
  @param  {object} response
  @param  {object} resolver
  @param  {function} callbackSuccess
  @param  {function} callbackError