Hi,
I am facing a weird issues with newman HtmlExtra teports.
In final report, the request headers, body is correctly showing. But response body is showing as “Cannot POST /write”.
And the console logs are also showing as [object] [object].
Also showing “connect ECONNREFUSED 127.0.0.1:3000” when I run my collection.
There is below code under collection level Tests. If I comment it the blow code, I am getting ECONNREFUSED error.
/*
let opts = {
requestName: request.name || request.url,
fileExtension: ‘csv’,
responseData: pm.response.text(),
reqBody: request.data,
mode: ‘writeFile’, // Change this to any function of the fs library of node to use it.
uniqueIdentifier: Date.now()
};
[//console.log](https://console.log/)(opts);
*/
pm.sendRequest({
url: ‘[http://localhost:3000](http://localhost:3000/)’,
method: ‘POST’,
header: ‘Content-Type:application/json’,
body: {
mode: ‘raw’,
raw: JSON.stringify(opts)
}
}, function (err,res) {
console.log(res);
// console.log(res);
});
Thank you