Loading XMLHttpRequest Library | Community
Skip to main content
karanv22355550
Level 2
Mar 12, 2018 3:08 PM UTC
Question

Loading XMLHttpRequest Library

Hey everyone, I am new to adobe campaign. I am trying to call an api within a javascript code icon. I am getting stuck when I try something like this var xhttp = new XMLHttpRequest(); Do I have to load the library in?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

jonase_2
New Participant
Apr 2, 2020 5:58 PM UTC

Did you manage to solve this?

Translate
karanv22355550
Level 2
Mar 16, 2018 7:54 PM UTC

Quick Question, Do you happen to know if there is a library to read the XML when I call the api? I tried using DOMParser but the library does not exist.

Translate
karanv22355550
Level 2
Mar 16, 2018 5:47 PM UTC

Wow thank you very much! This helped me call the api!

Translate
Level 2
Mar 13, 2018 11:01 AM UTC

Hi,

Without further info, I cannot help in detail but here is an example that may get you moving if you want to call an api within a javascript activity in a workflow.

                   //Make web service call for each email address, licence key is set here

var http = new HttpClientRequest("APIURL");

http.connect();

http.execute();

http.dispose();

http.disconnect();

Let me know if you need more help.

Dan

Translate
karanv22355550
Level 2
Mar 12, 2018 3:14 PM UTC

I forgot to mention that the error I get is, XMLHttpRequest is not defined.

Translate