You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Ludwig, Sven" <SL...@CONET.DE> on 2001/11/02 15:47:37 UTC

RE: Questions on HttpClient - Proxy Setting

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>