How to use proxy in HTTP/S Client for dynamic properties

Hello,

I try to write a js script to catch dynamic properties from a URL.

I'm using the HTTP/S Client which is available and tried the follwing example from the dynamic properties white paper:

var request = {

url: 'httpbin.org/.../passwd',

method: 'GET',

resourceAlias: new ResourceAlias('basic auth'),

params: { my: 'param', another: 'param' },

headers: { 'Content-Type': 'application/json', 'My-Header': 'someValue' },

data: 'some body message' };

var response = HTTPClient.call(request);

var responseBody; if (response.error) { responseBody = "error: " response.error; } else { responseBody = "ok: " response.body; }

The problem is, that the csa server has only access over a proxy to the internet. How can I configure the Proxy? I've tried proxy: 'IP:Port' in the request, but it didnt do anything. Is there a way to achieve this or any other way?


Thanks and best regards,
Alex

  • CSA seems to use RHINO and as it seems HTTPClient is using Proxy config from csa.properties

    try to set the below params in csa.properties (needs jboss restart as far as i know)

    let us know if it works.... i didnt tested

     

    String proxyHost = CSAProperties.get("csa.proxy.hostname");

    String proxyPort = CSAProperties.get("csa.proxy.port");

    String proxySchema = CSAProperties.get("csa.proxy.schema");