code: function formatHeaders(headers, sensitiveHeaders) {
      const retval = [];
      try {
          if (!headers || typeof headers !== 'object' || Object.keys(headers).length === 0) {
              return retval;
          }
  
          for (const header in headers) {
              if (header && headers[header] && sensitiveHeaders.indexOf(header) === -1) {
                  retval.push({name: header, value: headers[header]});
              }
          }
          return retval;
      } catch (e) {
          return retval;
      }
  }
docs: PerimeterX (http://www.perimeterx.com) NodeJS-Express SDK
  Version 1.0 Published 12 May 2016
   
  formatHeaders - Build request headers in the server2server format.
  
  @param {Object} headers - request headers in key value format.
  @return {Array} request headers an array format.