solarnetwork-d3.js
function generateCanonicalRequestMessage(params) {
      var msg = (params.method === undefined ? "GET" : params.method.toUpperCase()) + "\n" + params.uri.path + "\n" + (params.queryParams ? params.queryParams : "") + "\n";
      params.headers.headerNames.forEach(function(name) {
        msg += name + ":" + params.headers.headers[name] + "\n";
      });
      msg += params.headers.headerNames.join(";") + "\n";
      msg += CryptoJS.enc.Hex.stringify(params.bodyDigest);
      return msg;
    }
function generateCanonicalRequestMessage(params) {
      var msg = (params.method === undefined ? "GET" : params.method.toUpperCase()) + "\n" + params.uri.path + "\n" + (params.queryParams ? params.queryParams : "") + "\n";
      params.headers.headerNames.forEach(function(name) {
        msg += name + ":" + params.headers.headers[name] + "\n";
      });
      msg += params.headers.headerNames.join(";") + "\n";
      msg += CryptoJS.enc.Hex.stringify(params.bodyDigest);
      return msg;
    }
function generateCanonicalRequestMessage ( params ) { var msg = ( params . method === undefined ? "GET" : params . method . toUpperCase ( ) ) + "\n" + params . uri . path + "\n" + ( params . queryParams ? params . queryParams : "" ) + "\n" ; params . headers . headerNames . forEach ( function ( name ) { msg += name + ":" + params . headers . headers [ name ] + "\n" ; } ) ; msg += params . headers . headerNames . join ( ";" ) + "\n" ; msg += CryptoJS . enc . Hex . stringify ( params . bodyDigest ) ; return msg ; }
Generate the canonical request message for a set of request parameters.

@param {Object} params the request parameters
@param {String} params.method the HTTP request method
@param {Object} params.uri a parsed URI object for the request
@param {String} params.queryParams the canonical query parameters string
@param {Object} params.headers the canonical headers object
@param {Object} params.bodyDigest the CryptoJS body content digest
@return {String} the message
@preserve
Generate the canonical request message for a set of request parameters .