function convert (request, options, callback) {

  if (!validateIsFunction(callback)) {
    throw new Error('R-Httr~convert: Callback is not a function');
  }
  let snippet = '';
  options = sanitizeOptions(options, getOptions());

  const method = getRequestMethod(request),
    indentation = getIndentation(options),
    url = getRequestURL(request),
    mode = request.body ? request.body.mode : '',
    snippetHeaders = getSnippetHeaders(getRequestHeaders(request), indentation),
    snippetHeader = getSnippetHeader(),
    snippetFooter = getSnippetFooter(),
    snippetbody = parseBody(request.body, indentation, getBodyTrim(options), request.headers.get('Content-Type')),
    snippetRequest = getSnippetRequest({
      url: url,
      method: method,
      hasParams: snippetbody !== '',
      hasHeaders: snippetHeaders !== '',
      mode: mode,
      requestTimeout: options.requestTimeout
    });

  snippet += snippetHeader;
  snippet += snippetHeaders;
  snippet += snippetbody;
  snippet += snippetRequest;
  snippet += snippetFooter;

  return callback(null, snippet);
}
/**
  * Used to convert the postman sdk-request object in PHP-Guzzle request snippet
  *
  * @module convert
  *
  * @param  {Object} request - postman SDK-request object
  * @param  {object} options - process options
  * @param  {Function} callback - function with parameters (error, snippet)
  * @returns {String} - returns generated PHP-Guzzle snippet via callback
  */
Used to convert the postman sdk-request object in PHP-Guzzle request snippet
@module convert


Used to convert the postman sdk - request object in PHP - Guzzle request snippet @module convert
function convert (request, options, callback) {
  if (!validateIsFunction(callback)) {
    throw new Error('R-Httr~convert: Callback is not a function');
  }
  let snippet = '';
  options = sanitizeOptions(options, getOptions());
  const method = getRequestMethod(request),
    indentation = getIndentation(options),
    url = getRequestURL(request),
    mode = request.body ? request.body.mode : '',
    snippetHeaders = getSnippetHeaders(getRequestHeaders(request), indentation),
    snippetHeader = getSnippetHeader(),
    snippetFooter = getSnippetFooter(),
    snippetbody = parseBody(request.body, indentation, getBodyTrim(options), request.headers.get('Content-Type')),
    snippetRequest = getSnippetRequest({
      url: url,
      method: method,
      hasParams: snippetbody !== '',
      hasHeaders: snippetHeaders !== '',
      mode: mode,
      requestTimeout: options.requestTimeout
    });
  snippet += snippetHeader;
  snippet += snippetHeaders;
  snippet += snippetbody;
  snippet += snippetRequest;
  snippet += snippetFooter;
  return callback(null, snippet);
}
function convert ( request , options , callback ) { if ( ! validateIsFunction ( callback ) ) { throw new Error ( 'R-Httr~convert: Callback is not a function' ) ; } let snippet = '' ; options = sanitizeOptions ( options , getOptions ( ) ) ; const method = getRequestMethod ( request ) , indentation = getIndentation ( options ) , url = getRequestURL ( request ) , mode = request . body ? request . body . mode : '' , snippetHeaders = getSnippetHeaders ( getRequestHeaders ( request ) , indentation ) , snippetHeader = getSnippetHeader ( ) , snippetFooter = getSnippetFooter ( ) , snippetbody = parseBody ( request . body , indentation , getBodyTrim ( options ) , request . headers . get ( 'Content-Type' ) ) , snippetRequest = getSnippetRequest ( { url : url , method : method , hasParams : snippetbody !== '' , hasHeaders : snippetHeaders !== '' , mode : mode , requestTimeout : options . requestTimeout } ) ; snippet += snippetHeader ; snippet += snippetHeaders ; snippet += snippetbody ; snippet += snippetRequest ; snippet += snippetFooter ; return callback ( null , snippet ) ; }
Used to convert the postman sdk-request object in PHP-Guzzle request snippet
 @module convert
Used to convert the postman sdk - request object in PHP - Guzzle request snippet @module convert