lib/http/base.js
function normalizeResponse(response)
{
  // if the response doesn't already have a getResponseHeader() method, add one
  if (response && !response.getResponseHeader)
  {
    response.getResponseHeader = function(header)
    {
      return response.headers && response.headers[
              Util.isString(header) ? header.toLowerCase() : header];
    };
  }

  return response;
}
function normalizeResponse(response)
{
  // if the response doesn't already have a getResponseHeader() method, add one
  if (response && !response.getResponseHeader)
  {
    response.getResponseHeader = function(header)
    {
      return response.headers && response.headers[
              Util.isString(header) ? header.toLowerCase() : header];
    };
  }

  return response;
}
function normalizeResponse ( response ) { // if the response doesn't already have a getResponseHeader() method, add one if ( response && ! response . getResponseHeader ) { response . getResponseHeader = function ( header ) { return response . headers && response . headers [ Util . isString ( header ) ? header . toLowerCase ( ) : header ] ; } ; } return response ; }
Normalizes the response object so that we can extract response headers from
it in a uniform way regardless of whether we're using request.js or
browser-request.js.

@param {Object} response

@return {Object}
Normalizes the response object so that we can extract response headers from it in a uniform way regardless of whether we re using request . js or browser - request . js .