GetJSON is returning with header only
I am using TWX 9.3.1 , trying to get JSON output thru a JS service using GetJSON/LoadJSON snippet.
I checked it thru POSTMAN and it worked perfectly. This is my code:
var AuthVal = "Bearer "+token;
var ServiceHeader = {"Content-Type" : "application/text",
"Accept" :"application/text",
"Authorization" : AuthVal,
"maxItems":7000};
var url="http://apps-dev.xylem.net/ApisManager/api/MES/Get/BrazedBOM?partNumber=BY568504016017";
let params = {
headers: ServiceHeader /* JSON */,
url: url /* STRING */,
timeout: 0 /* NUMBER {"defaultValue":60} */
};
// result: JSON
var result = Resources["ContentLoaderFunctions"].LoadJSON(params);
and this string output:
{"headers":{"Authorization":"Bearer e6c336482a7d4767883c2268bd1836fe","maxItems":7000,"Accept":"application/text","Content-Type":"application/text"},"responseHeaders":{"X-UA-Compatible":"IE=Edge","Server":"Microsoft-IIS/8.5","Access-Control-Allow-Origin":"*","Content-Length":"6209","Date":"Thu, 25 Aug 2022 06:30:00 GMT","Content-Type":"application/json; charset=utf-8"},"responseStatus":{"reasonPhrase":"OK","protocolVersion":{"protocol":"HTTP","major":1,"minor":1},"statusCode":200}}

