HttpClientRequest as proxy



Hey, I just built a get function that calls on a https API, but the server-department at my office wants me to use a proxy for this. Im relativily new to proxies, so my question is if anyone has an idea of how to wrap this get function in to a https proxy?


//Require temp Schema to match against city

var query = xtk.queryDef.create(

  <queryDef operation="select" schema={vars.targetSchema}>


      <node expr="@smartcity"/>




var res = query.ExecuteQuery();

function getCall(){

  var http = new HttpClientRequest();

  http.url = "https://url..." + line.@smartcity + "...restoftheurlandkey";

  http.method = "GET"; //The GET request


  var response = http.response;

  logInfo( response.body.toString());


for each (var line in res) {



In regards, Martin!

Accepted Solutions (1)

Accepted Solutions (1)




Hi Martin,

There is a setting in serverConf.xml and it is called as <proxyConfig> where you can define subnodes as <proxyHTTP> and <proxyHTTPS> wherein you can define the proxy address, credentials and the port details.

<proxyConfig enabled="true" override="localhost*" useSingleProxy="false">

     <!-- HTTP Proxy -->

     <proxyHTTP address="svr001.zone2.proxy.mynetwork" login="" password="" port="8080" />

     <!-- Secure proxy -->

     <proxyHTTPS address="svr001.zone2.proxy.mynetwork" login="" password="" port="8080" />


However, as per my knowledge, there is a limitation at Campaign side that proxy is not used by activities like Web Download. Not sure if the impact is on JS code activity as well.

I'll suggest to get the proxy settings applied in the config, then restart the services.

Post that test your code. Another way is you can use the curl library to make a GET request from inside workflow. Test and see if it works.


Answers (4)

Answers (4)



Hi Martin,

This is far beyond my knowledge, so bumping this thread anyway.

Let me know if you manage to find something in the meantime.