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

Reading resources

Resources from OData RESTful APIs are accessible via the HTTP GET request. For instance, the following GET request retrieves the Departments entity collection from the OData REST API server as follows:

GET http://localhost:8080/hrapp/odata/Departments HTTP/1.1 

The result that you may get from the OData REST API server in response to the preceding call will be structured in accordance with the OData protocol specification. This keeps the client code simple and reusable.

To read the individual resource element, you can pass the unique identifier for the resource, as shown in the following code snippet. This example reads the details of the department with the given ID:

GET http://localhost:8080/hrapp/odata/Departments(10) ...
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