want to execute curl from Javascript, but don't know how set authentication option

156 Views Asked by At

Want to create the ticket in zendesk, but the scenario like cannot install cUrl. So want to execute curl from JavaScript. But don't know how to set authentication option.

var curl = new Curl();

[url, data etc code]

curl.setOpt(Curl.option.URL, url);
curl.setOpt(Curl.option.POSTFIELDS, data);
curl.setOpt(Curl.option.VERBOSE, true);

here which option I need to set for authentication ?

0

There are 0 best solutions below