Copy link to clipboard
Copied
Hi, I'm trying to send a GET request with Net.HTTP.request to http://dummy.restapiexample.com/ , actually I'm calling this endpoint: http://dummy.restapiexample.com/api/v1/employee/7052
No matter what I try I always get this error:
NotAllowedError: Security settings prevent access to this property or method.
It's a js which is being called at document level, improved security is disabled and I've also tried enabling it.
the code is -->
//<Document-Level>
//<ACRO_source>Init</ACRO_source>
//<ACRO_script>
/**** pertenece a: Document-Level:Init ****/
myTrustedFunction = app.trustedFunction(
function()
{
this.getField("textAJAX").display = display.hidden;
console.println("2 - ");
Net.HTTP.request({
cVerb: 'GET',
cURL: 'http://dummy.restapiexample.com/api/v1/employee/7052',
oHandler: {
response: function(msg, uri, err) {
if (err != undefined) {
app.alert(msg)
} else {
console.println("1");
var stream = msg;
console.println(stream);
};
}
}
});
}
);
//</ACRO_script>
Copy link to clipboard
Copied
Did you observe the special note for the Net.HTTP.request method? This does not seem to meet the requirements. Also, make sure you're NOT using Reader.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more