• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error called get request

Community Beginner ,
Apr 02, 2019 Apr 02, 2019

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>

TOPICS
Acrobat SDK and JavaScript

Views

426

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2019 Apr 02, 2019

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines