Skip to main content
ad_ind38716857
Known Participant
June 21, 2022
Question

HTTP post not working

  • June 21, 2022
  • 1 reply
  • 252 views

Hi All,

 

I tried to call the API through JSX script using http.jsx library.

The below is my code to execute the URL.

#include "http.jsx"

// POST example
var data = $http({
    method: 'POST',
    url: 'http://localhost:8082/font?moduleAddress=host.com:8082&filePath=C:\Users\user\Desktop\test.indd'
});

alert(data);

 

Could anyone correct me if I did anything wrong in the above code.

 

Thanks.

This topic has been closed for replies.

1 reply

ad_ind38716857
Known Participant
June 21, 2022

I'm trying to execute the JSX script, it gives the below error.

Error number: 54
Uncaught JavaScript exception: can't connect to localhost:8082