Here is my code.
var SchCodeRequest = '{ "aa" : "","abb" : ""}'; var req = JSON.parse((JSON.stringify(SchCodeRequest))); var url = "https://localHost"; var operation = "POST"; var headers = { 'Content-Type' : 'application/json' }; var request = new Request(url, operation, headers, req); print(request); var exchange = httpClient.send(request); if (httpres.isSuccess()) { var resp = exchange.getResponse(); print(resp); var hresp = JSON.parse(resp); context.setVariable("finalResponse", hresp); //var responsePayload = exchange.getResponse().content; } else { var resp = httpres.getError(); context.setVariable("httpres", resp); }
when I try to hit the request it printing as below request:https://localHost? But the expected output should be like below https://localHost