Skip to Content
RESTful Java Web Services - Third Edition
book

RESTful Java Web Services - Third Edition

by Balachandar Bogunuva Mohanram
November 2017
Intermediate to advanced
420 pages
10h 29m
English
Packt Publishing
Content preview from RESTful Java Web Services - Third Edition

Calling REST APIs using the JAX-RS client

The JAX-RS client API encapsulates the uniform interface constraint, which is a key constraint of the REST architectural style, and offers many convenient APIs for accessing the web resources. We will start by looking at the JAX-RS client API for reading a simple RESTful web service.

You will use the javax.ws.rs.client.ClientBuilder factory class as the entry point to the client API. The javax.ws.rs.client.Client instance returned by ClientBuilder exposes a set of high-level APIs for accessing the web resources.

Let's now apply what we've learned and see how we can access the REST resource identified by the following URI: http://localhost:8080/rest-chapter3-service/webresources/departments.

The preceding ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

RESTful Java Web Services, Second Edition

RESTful Java Web Services, Second Edition

Jobinesh Purushothaman
Java Web Services

Java Web Services

David A Chappell, Tyler Jewell

Publisher Resources

ISBN: 9781788294041Supplemental Content