function parseHeaders (headersArray, indent, trim) {
  var headerString = '',
    headerDictionary = [];
  if (_.isEmpty(headersArray)) {
    return headerString;
  }

  headerString += 'var headers = {\n';

  _.forEach(headersArray, function (header) {
    if (!header.disabled) {
      headerDictionary.push(indent + '\'' + header.key + '\': \'' + sanitize(header.value, trim) + '\'');
    }
  });

  headerString += headerDictionary.join(',\n');
  headerString += '\n};\n';

  return headerString;
}
/**
 * Parses headers from the request.
 *
 * @param {Object} headersArray array containing headers
 * @param {String} indent indentation required for code snippet
 * @param {Boolean} trim indicates whether to trim string or not
 */
Parses headers from the request.
@param {Object} headersArray array containing headers
@param {String} indent indentation required for code snippet
@param {Boolean} trim indicates whether to trim string or not
Parses headers from the request . @param { Object } headersArray array containing headers @param { String } indent indentation required for code snippet @param { Boolean } trim indicates whether to trim string or not
function parseHeaders (headersArray, indent, trim) {
  var headerString = '',
    headerDictionary = [];
  if (_.isEmpty(headersArray)) {
    return headerString;
  }
  headerString += 'var headers = {\n';
  _.forEach(headersArray, function (header) {
    if (!header.disabled) {
      headerDictionary.push(indent + '\'' + header.key + '\': \'' + sanitize(header.value, trim) + '\'');
    }
  });
  headerString += headerDictionary.join(',\n');
  headerString += '\n};\n';
  return headerString;
}
function parseHeaders ( headersArray , indent , trim ) { var headerString = '' , headerDictionary = [ ] ; if ( _ . isEmpty ( headersArray ) ) { return headerString ; } headerString += 'var headers = {\n' ; _ . forEach ( headersArray , function ( header ) { if ( ! header . disabled ) { headerDictionary . push ( indent + '\'' + header . key + '\': \'' + sanitize ( header . value , trim ) + '\'' ) ; } } ) ; headerString += headerDictionary . join ( ',\n' ) ; headerString += '\n};\n' ; return headerString ; }
Parses headers from the request.
Parses headers from the request .