Changing the format of the body.raw when the requestBody is not an object

This commit is contained in:
Erik Mendoza
2022-07-12 17:24:49 -05:00
parent af69245bb8
commit 24eee98b49
4 changed files with 60 additions and 8 deletions

View File

@@ -1928,7 +1928,9 @@ module.exports = {
updateOptions = {
mode: rDataMode,
raw: JSON.stringify(bodyData, null, options.indentCharacter)
raw: bodyType !== APP_JSON ?
bodyData.toString() :
JSON.stringify(bodyData, null, options.indentCharacter)
};
}