commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig, Sven" <SLud...@CONET.DE>
Subject RE: Questions on HttpClient - Proxy Setting
Date Fri, 02 Nov 2001 14:47:37 GMT
Hello!

I have another question. I am testing with the HttpClient class,
opening a session, using a method and closing the session.

How do you handle the Proxy-Settings passed by the calls of
the startSession(...) methods of HttpClient?

Until today I only know about the possibility to set only O N E Proxy
Virtual-Machine wide at a time with the following code (example):

  private void removeProxy() {
    System.getProperties().remove("proxySet");
    System.getProperties().remove("proxyHost");
    System.getProperties().remove("proxyPort");
  }

  private void setProxy() {
    System.setProperty("proxySet","true");
    System.setProperty("proxyHost","aproxyHost");
    System.setProperty("proxyPort","aProxyPort");
  }

Do you have a better posibillity?
Or do you just change the System-Properties for every request?

I am looking forward to an answer.

greetings
Sven Ludwig


 -----------------------------------------------------------------
   Sven Ludwig                     mailto:sludwig@conet.de
   CONET CONSULTING AG             http://www.conet.de
   Theodor-Heuss-Allee 19          Fax:   +49 2242 939-393
   53773 Hennef                    Tel.:  +49 2242 939-683
   GERMANY
 ------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message