function parseRawBody (body, indentation, bodyTrim, contentType) {
  let bodySnippet = '';
  if (contentType && (contentType === 'application/json' || contentType.match(/\+json$/))) {
    try {
      let jsonBody = JSON.parse(body);
      bodySnippet += `"${sanitizeString(JSON.stringify(jsonBody, null, indentation.length), bodyTrim)}"`;
    }
    catch (error) {
      bodySnippet += `"${sanitizeString(body.toString(), bodyTrim)}"`;
    }
  }
  else {
    bodySnippet += JSON.stringify(body.toString());
  }
  return bodySnippet;
}
/**
 * Parses Raw data
 *
 * @param {Object} body body object from request.
 * @param {String} indentation indentation to be added to the snippet
 * @param {boolean} bodyTrim trim body option
 * @param {String} contentType Content type of the body being sent
 * @returns {String} snippet of the body generation
 */
Parses Raw data
@param {Object} body body object from request.
@param {String} indentation indentation to be added to the snippet
@param {boolean} bodyTrim trim body option
@param {String} contentType Content type of the body being sent
@returns {String} snippet of the body generation
Parses Raw data @param { Object } body body object from request . @param { String } indentation indentation to be added to the snippet @param { boolean } bodyTrim trim body option @param { String } contentType Content type of the body being sent @returns { String } snippet of the body generation
function parseRawBody (body, indentation, bodyTrim, contentType) {
  let bodySnippet = '';
  if (contentType && (contentType === 'application/json' || contentType.match(/\+json$/))) {
    try {
      let jsonBody = JSON.parse(body);
      bodySnippet += `"${sanitizeString(JSON.stringify(jsonBody, null, indentation.length), bodyTrim)}"`;
    }
    catch (error) {
      bodySnippet += `"${sanitizeString(body.toString(), bodyTrim)}"`;
    }
  }
  else {
    bodySnippet += JSON.stringify(body.toString());
  }
  return bodySnippet;
}
function parseRawBody ( body , indentation , bodyTrim , contentType ) { let bodySnippet = '' ; if ( contentType && ( contentType === 'application/json' || contentType . match ( / \+json$ / ) ) ) { try { let jsonBody = JSON . parse ( body ) ; bodySnippet += ` ${ sanitizeString ( JSON . stringify ( jsonBody , null , indentation . length ) , bodyTrim ) } ` ; } catch ( error ) { bodySnippet += ` ${ sanitizeString ( body . toString ( ) , bodyTrim ) } ` ; } } else { bodySnippet += JSON . stringify ( body . toString ( ) ) ; } return bodySnippet ; }
Parses Raw data
 @param {Object} body body object from request.
Parses Raw data @param { Object } body body object from request .