Hi,
I have a REST API which is being invoked from ACM V7 but in Response we are receiving the Response Code as - 307
Any idea on how to handle the scenario.
It is working fine from Postman.
It is a simple GET request.
var url = "***.****************.***/?param=1¶m=2";
logInfo(url);
var http = new HttpClientRequest(url);
http.method = "GET";
//http.header["Content-Type"] = "application/json; odata.metadata=minimal";-- tried this if anything make different but did not help anything.
http.execute();
var resp = http.response;
logInfo("resp = http.response : "+resp.toSource()); ----- ({})
var code = http.response.code;
logInfo("Code ="+ code); ------ Code = 307
var bod = http.response.body;
logInfo("body ="+ bod); ---- body = <a href=""> Temporary Redirect</a>[ Tried with this url to make a second http request but not successful.]
var Json_resp = http.response.toString();
//var Json_resp=resp.body;
//var jsonObj = JSON.parse(resp.body); --- tried this but receiving error as the response is not in JSON Format
logInfo("jsonObj = "+ Json_resp); ---- jsonObj = [object HttpClientResponse]