Pavel Bucek's Weblog

  • January 26, 2011

Jersey - Apache HTTP Client 4.1 (experimental) integration available

What is supported? All basic functionality (simple requests with or without entity) and Jersey related things like filters (logging, auth, ...). Additionally, some of Apache HTTP Client features are supported by default - like cookies processing.

What needs to be done:

  • Apache style auth support
  • Proxy configuration settings
  • Caching and other features...

How can you give it a try? Simply.. put another dependency to your maven project:


And create your client like:

        Client c = new com.sun.jersey.client.apache.ApacheHttpClient4();
        WebResource wr = c.resource("http://localhost:9998/helloworld-webapp");
        String s = wr.path("helloworld").get(String.class);

and use it like you are used to..

Comments/remarks/suggestions are welcomed!

Join the discussion

Comments ( 1 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.