[ object aggregate ] error on making a 'GET' request to a server
Hello community,
I have been trying to write a JavaScript extension which makes a 'GET' request to a server on pressing of a sub-menu item in Adobe Acrobat professional. After writing the script after following from an online resource(https://gist.github.com/randycasburn/802f278c3cfef0873dd086c34bbb9fee), I tried executing the folder level script but it gave an 'object aggregate' error in console. I tried looking for it online but could not found anything helpful. I think the issue is with the request which is not able to fetch data. Below is the script for the same. Any help regarding this would be greatly appreciated.
Thanks.
// Make HTTP GET request
ajax = app.trustedFunction(function(fURL) {
app.beginPriv();
Net.HTTP.request({ cVerb:"GET", cURL:fURL, oHandler: ajaxCallback});
app.endPriv();
});
// process the response
ajaxCallback = {
response:function(msg,uri,e){
var stream = msg;
var string = "";
var error = e == undefined? 'No HTTP errors' : "ERROR: " + e; // here it is giving [ object aggregate ] error
console.println(error);
// string = SOAP.stringFromStream( stream );
// oResult = JSON.parse(string);
// console.println(error);
// console.println( "id: " + oResult.id);
// console.println( "userId: " + oResult.userId);
// console.println( "title: " + oResult.title);
// console.println( "body: " + oResult.body);
}
};
// Add menu item to kick it all off
app.addMenuItem({
cName: "Get Mock Data", cParent: "File",
cExec: 'ajax("https://jsonplaceholder.typicode.com/posts/1");',nPos: 0});
Below is the screenshot of the error:

