code: function createResponse(xhr, request){
    
    // XHR header processing borrowed from jQuery
    var responseHeaders = {}, match;
    while ((match = headersRegex.exec(xhr.getAllResponseHeaders()))) {
  		responseHeaders[match[1].toLowerCase()] = match[2];
  	}
  	
    return {
      statusCode: xhr.status,
      statusText: xhr.statusText,
      headers: responseHeaders,
      originalUrl: request.url,
      effectiveUrl: request.url,
      redirected: false,
      requestMethod: request.method,
      requestHeaders: request.headers,
      body: xhr.responseText,
      retries: 0,
      throttled: false
    };
  }
docs: Convert an XHR response to a standard response object
  
  @param {XMLHttpRequest} xhr
  @param {Object} request {url, method, headers, retries}
  @return {Object} response