Disabled body proning for requests with method like GET, HEAD etc.

This commit is contained in:
Vishal Shingala
2022-01-20 12:47:03 +05:30
parent d206290a8e
commit 776544a2c9

View File

@@ -1906,7 +1906,7 @@ module.exports = {
updateOptions = {
mode: rDataMode,
raw: JSON.stringify(bodyData, null, 4)
raw: JSON.stringify(bodyData, null, options.indentCharacter)
};
}
@@ -2400,6 +2400,10 @@ module.exports = {
}
pmBody = this.convertToPmBody(reqBody, REQUEST_TYPE.ROOT, components, options, schemaCache);
item.request.body = pmBody.body;
// Following is added to make sure body pruning for request methods like GET, HEAD etc is disabled'.
item.protocolProfileBehavior = { disableBodyPruning: true };
if (!options.keepImplicitHeaders || (!_.find(reqParams.header, (h) => {
return _.toLower(_.get(h, 'name')) === 'content-type';
}))) {