Question
1
Replies
157
Views
Posted: June 19, 2019
Last activity: July 3, 2019
Set proxy - REST connector
Hi,
We need to call a REST webservice through a proxy and we have added a Java step in the activity before executing the Connect-Rest step.
System.setProperty("http.proxyHost", "1.2.3.4");
System.setProperty("http.proxyPort", "80");
The requirements don't allow to change the proxy for all the integrations.
Version: 7.3.1
Is it okay? Does it exist other way to set the proxy?
Thank you in advance.
Hi,
This code changes the proxy for all the system, so it is incorrect. We need to change the proxy only for one REST connector.
There is other code that it sets the proxy properties, but later it cannot be change inside the Connector rule call.
Properties props= new Properties(System.getProperties());
props.put("http.proxySet", "true");
props.put("http.proxyHost", "10.x.x.x");
props.put("http.proxyPort", "80");
Properties newprops = new Properties(props);
Any idea?