diff --git a/javasource/restservices/consume/RestConsumer.java b/javasource/restservices/consume/RestConsumer.java index 84ffb03..51cac93 100644 --- a/javasource/restservices/consume/RestConsumer.java +++ b/javasource/restservices/consume/RestConsumer.java @@ -268,6 +268,9 @@ else if ("PUT".equals(method)) else if (request instanceof PutMethod && requestEntity != null) ((PutMethod)request).setRequestEntity(requestEntity); + if (!org.apache.commons.lang.StringUtils.isEmpty(System.getProperty("http.proxyHost"))) { + client.getHostConfiguration().setProxy(System.getProperty("http.proxyHost"), Integer.valueOf(System.getProperty("http.proxyPort"))); + } int status = client.executeMethod(request); Header responseEtag = request.getResponseHeader(RestServices.HEADER_ETAG);