Permalink
Browse files

Added support for -Dhttp.proxyHost/Port (ignored by Jakarta HttpClien…

…t by default)
  • Loading branch information...
1 parent 47c0f7d commit 4b3b5ffedf55951bbfd1f705f45673fa9e3e6a16 @koles koles committed Aug 24, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 backend/src/main/java/com/gooddata/integration/rest/GdcRESTApiWrapper.java
@@ -96,6 +96,14 @@
public GdcRESTApiWrapper(NamePasswordConfiguration config) {
this.config = config;
client = new HttpClient();
+
+ final String proxyHost = System.getProperty("http.proxyHost");
+ final int proxyPort = System.getProperty("http.proxyPort") == null
+ ? 8080 : Integer.parseInt(System.getProperty("http.proxyPort"));
+
+ if (proxyHost != null) {
+ client.getHostConfiguration().setProxy(proxyHost,proxyPort);
+ }
}
/**

0 comments on commit 4b3b5ff

Please sign in to comment.