Hi All ,
I am trying to pass the following API body to HTTP request but it doesn’t work at all
const body = {
memberFirmId:“xxx”,
clientId: “xxxxx”,
projectSitesData: JSON.stringify([
{
owner: {
loginName: “test@email.com”
},
name: “TestO2”,
projectReferenceId: “”,
aptEngagementId: “”,
}
])
};
const body_str = JSON.stringify(body);
pm.variables.set(‘request_body’, body_str);
I tried something like this :
“{” +
“memberFirmId”: “xxx”,
“clientId”: “xxxxx”,
“projectSitesData” + “: {” +
Chr(34) + “owner” + Chr(34) + “: {” +
Chr(34) + “loginName” + Chr(34) + ": " + Chr(34) + “test@email.com” + Chr(34) +
“},” +
Chr(34) + “name” + Chr(34) + ": " + Chr(34) + “TestO2” + Chr(34) + “,” +
Chr(34) + “projectReferenceId” + Chr(34) + ": , " +
Chr(34) + “aptEngagementId” + Chr(34) + ": " +
“}” +
“}”
Can you please help me with that ?!