Quantcast
Viewing all articles
Browse latest Browse all 6412

How to set the payload in XSJS

Hi ,

 

I am trying to call this REST API with some URL params and I need to set payload along with this.But I'm not able to set it.

Where am I going wrong?

 

-A XSJS Application which is calling a REST API

 

var clientReport = new $.net.http.Client();

var payload=[];

payload.rpt=rpt;

$.request.setBody(payload)

clientReport.request($.net.http.POST, "http://XXXXXXXX:8080/Applicatin/?ID="+ID);

var responseReport=clientReport.getResponse();

 

 

Thank you .


Viewing all articles
Browse latest Browse all 6412

Trending Articles