...
There is also support for proxy authentication via the proxyUsername
and proxyPassword
options.
Using proxy settings
...
outside of URI
*Only for >= Camel 1.6.2 and < Camel 2.2.0 *
The HTTP component will detect Java System Properties for http.proxyHost
and http.proxyPort
and use them if provided.
See more at SUN http proxy documentation.
To avoid the System properties conflicts, from Camel 2.2.0 you can only set the proxy configure from CameContext or URI.
Java DSL :
Code Block |
---|
context.getProperties().put("http.proxyHost", "172.168.18.9");
context.getProperties().put("http.proxyPort" "8080");
|
Spring XML
Code Block |
---|
<camelContext>
<properties>
<property key="http.proxyHost" value="172.168.18.9"/>
<property key="http.proxyPort" value="8080"/>
</properties>
</camelContext>
|
Camel will first set the settings from Java System or CamelContext Camel will first set the settings from Java System Properties and then the endpoint proxy options if provided.
So you can override the system properties with the endpoint options.
...