users@jersey.java.net

Re: [Jersey] Client API support connection through proxy?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 22 Apr 2009 10:56:00 +0200

On Apr 22, 2009, at 10:39 AM, Erik Eriksson wrote:

> Hi,
>
> Does the Client API (com.sun.jersey.api.client) support connection
> through a proxy?
>

The default client support use HttpURLConnection and for that you need
to use the system-based settings for the proxy:

   http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html

The alternative is to use the Apache HTTP client integration.

   https://jersey.dev.java.net/nonav/apidocs/1.0.3/contribs/jersey-apache-client/com/sun/jersey/client/apache/package-summary.html

and sent the proxy URI property:

https://jersey.dev.java.net/nonav/apidocs/1.0.3/contribs/jersey-apache-client/com/sun/jersey/client/apache/config/ApacheHttpClientConfig.html
#PROPERTY_PROXY_URI

Paul.

> If, how do add the proxy's address and type?
>
> Regards,
> Erik Eriksson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>