swagger-ui/lib/shred.bundle.js
function (req) {
  var headers = req.getHeaders();
  var headerString = "";

  for (var key in headers) {
    headerString += '-H "' + key + ": " + headers[key] + '" ';
  }

  var bodyString = ""

  if (req.content) {
    bodyString += "-d '" + req.content.body + "' ";
  }

  var query = req.query ? '?' + req.query : "";

  console.log("curl " +
    "-X " + req.method.toUpperCase() + " " +
    req.scheme + "://" + req.host + ":" + req.port + req.path + query + " " +
    headerString +
    bodyString
  );
}
function (req) {
  var headers = req.getHeaders();
  var headerString = "";

  for (var key in headers) {
    headerString += '-H "' + key + ": " + headers[key] + '" ';
  }

  var bodyString = ""

  if (req.content) {
    bodyString += "-d '" + req.content.body + "' ";
  }

  var query = req.query ? '?' + req.query : "";

  console.log("curl " +
    "-X " + req.method.toUpperCase() + " " +
    req.scheme + "://" + req.host + ":" + req.port + req.path + query + " " +
    headerString +
    bodyString
  );
}
function ( req ) { var headers = req . getHeaders ( ) ; var headerString = "" ; for ( var key in headers ) { headerString += '-H "' + key + ": " + headers [ key ] + '" ' ; } var bodyString = "" if ( req . content ) { bodyString += "-d '" + req . content . body + "' " ; } var query = req . query ? '?' + req . query : "" ; console . log ( "curl " + "-X " + req . method . toUpperCase ( ) + " " + req . scheme + "://" + req . host + ":" + req . port + req . path + query + " " + headerString + bodyString ) ; }
Logs the curl command for the request.
Logs the curl command for the request .