Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package com.sun.jersey.client.apache

Provides support for the Client API that utilizes the Apache HTTP client to send and receive HTTP request and responses.

See:
Description

Interface Summary
ApacheHttpMethodExecutor | An Apache HTTP method executor.

Class Summary
ApacheHttpClient | A `Client` that utilizes the Apache HTTP client to send and receive HTTP request and responses.
ApacheHttpClientHandler | A root handler with Jakarta Commons HttpClient acting as a backend.
DefaultApacheHttpMethodExecutor | A default implementation of an Apache HTTP method executor.

## Package com.sun.jersey.client.apache Description

Provides support for the Client API that utilizes the Apache HTTP client to send and receive HTTP request and responses.

The client API with the Apache HTTP client can be used as follows to make simple GET and POST requests to a Web resource:

>          Client c = ApacheHttpClient.create();
>          WebResource r = c.resource("http://host/base");
>          String s = r.get(String.class);
>          s = r.post(String.class, s);

To support basic authentication with the user name "foo" and the password "bar" the following configuration may be utilized:

>          DefaultApacheHttpClientConfig config = new DefaultApacheHttpClientConfig();
>          config.getState().setCredentials(null, null, -1, "foo", "bar");
>          ApacheHttpClient c = ApacheHttpClient.create(config);
>          WebResource r = c.resource("http://host/base");
>          String s = r.get(String.class);
>          s = r.post(String.class, s);

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Copyright © 2011 Oracle Corporation. All Rights Reserved.