Hi Team, I have two requests I should pass all the response values from the first to the second request body area.
I have created a variable called “response2” and set the response in a variable, but when I am passing a response value in the second request body. i am getting some errors and looks like value is not passed from first request response
1 request tests area :
if (pm.response.code == 200 ) {
pm.test(“search contract is successful”, function () {
var jsonData = pm.response.json();
pm.globals.set(“response2”, jsonData);
console.log(pm.globals.get(“response2”));
});
}
Second request body area ;
{
“policy”:
“{{response2}}”,
“documents”: [
{
“name”: “Änderungantrag”,
“created”: “2020-10-16T07:55:14.472Z”,
“contactId”: “123123-asdasd2-asdasd2”,
“issueId”: “asdlhasd-das2-das2”,
“sender”: “POLICYHOLDER”,
“fileReference”: “ioasdjasfhoiashf21asinfoaisdj”,
“isSigned”: true,
“fileMimeType”: “pdf”
}
]
}