Specifying a dependency of the JAX-RS client API

To use the client part of the JAX-RS specification, the client application needs to depend only on the client part of the JAX-RS libraries. If you use the Jersey implementation, the dependency entry in pom.xml will look like the following:

<dependency> 
    <groupId>org.glassfish.jersey.core</groupId> 
    <artifactId>jersey-client</artifactId> 
    <version>2.19</version><!-sets the correct version --> 
</dependency> 

This is the minimum dependency that the application needs to have for using the Jersey implementation of the JAX-RS client APIs. You need to add additional modules for availing specific runtime features. For instance, to enable the automatic conversion of the response content type (for example, ...

Get RESTful Java Web Services - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.