you can with javascript promise - await mechanism. even iterations is possible.
//------------------sandos---------------------------
function SendRequest(maxRequest) {
return new Promise(resolve => {
pm.sendRequest({ ā¦ },
function(err, res) {
var response = JSON.stringify(res);
console.log("res: " + pinresponse);
if (maxRequest>1) {
SendRequest(maxRequest-1);
} else {
resolve(1);
}
}
);
});
}
async function SenReq(maxRequest) {
return await SendRequest(maxRequest);
}
//Engineered with Sandos chan