O'Reilly logo

Advanced Java® EE Development with WildFly® by Deepak Vohra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Client API

The Client API is a high-level API used to access web resources and integrate with JAX-RS providers and is included in the javax.ws.rs.client package.

Note

Previously, different implementations provided the Client API, but in JAX-RS 2.0, the Client API is provided as a core API.

Creating a client instance

A Client instance is required to build and run client requests to access or consume web resources. In the RESTEasy client class RESTEasyClient.java, create a Client instance from ClientBuilder using the newClient() method as follows:

Client client = ClientBuilder.newClient();

Providers, filters, and features can be configured with the Client object using the register() method. For example, the org.jboss.resteasy.plugins.providers.JaxrsFormProvider.class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required