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

Where is the library for HttpClientRequest?

New Here ,
May 22, 2019 May 22, 2019

Copy link to clipboard

Copied

I have the following code:

var jp = {};

jp.flowState = 'ST_PendingPDFupload';

jp.pressedButton = 'S_Submit1';

jp.F_Value1 = this.getField("F_Value1").value.toString();

var UID = this.getField("UID").value.toString();

var urla = 'https://domain/forms-basic/secure/org/data/ba48a093-5a1d-40ef-87f6-bb196b95fa9f/F_NewForm1/';

var urlb = '?freedomIdentifyKey=55';

var url = (urla + UID + urlb);

var http = new HttpClientRequest(url);

http.header["Cookie"] = "freedomIdentifyKey=55";

http.header["Content-Type"] = "application/json; charset=utf-8";

http.header["Accept"] = "application/json; charset=utf-8";

http.body = JSON.stringify(jp);

http.method = "PUT";

http.connect();

http.execute();

http.dispose();

http.disconnect();

I am getting an error in Acrobat of: ReferenceError: HttpClientRequest is not defined.  I believe I need to add something like:

loadLibrary("nms:amcIntegration.js");

But I am not sure what the library is. 

TOPICS
Acrobat SDK and JavaScript

Views

119

Likes

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
Community Expert ,
May 22, 2019 May 22, 2019

Copy link to clipboard

Copied

Acrobat Javascript doesn't support this.

Likes

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 ,
May 23, 2019 May 23, 2019

Copy link to clipboard

Copied

You code seems to have been written for some other kind of Javascript.

Likes

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
Community Expert ,
May 28, 2019 May 28, 2019

Copy link to clipboard

Copied

LATEST

Your code is written for browser JavaScript. Acrobat does have the ability to invoke a web service but it can only be made outside the context of a document (for example, in a folder level JavaScript). Look at the Acrobat JavaScript documentation for Net.HTTP.request();

Likes

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