Skip to Content
RESTful Java Web Services, Second Edition
book

RESTful Java Web Services, Second Edition

by Jobinesh Purushothaman
September 2015
Intermediate to advanced
354 pages
8h 27m
English
Packt Publishing
Content preview from RESTful Java Web Services, Second Edition

Asynchronous execution of RESTful web APIs

If your RESTful web API takes a considerable amount of time for finishing the job and the users cannot wait for the API to finish, you may want to consider using the asynchronous mode of execution.

The asynchronous RESTful web API works as explained here. The client calls the asynchronous RESTful API as any other API:

POST /employees HTTP/1.1 
[{"departmentId": 10, "departmentName": "IT"}, 
{"departmentId": 20, "departmentName": "HR"},...] 

The asynchronous API that is responsible for handling the preceding request accepts the request and returns the 202 Accepted status to the caller without keeping the caller waiting for the request to finish. The response also can have a temporary resource inside the Location ...

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 - Third Edition

RESTful Java Web Services - Third Edition

Balachandar Bogunuva Mohanram
RESTful Web Services

RESTful Web Services

Leonard Richardson, Sam Ruby

Publisher Resources

ISBN: 9781784399092Supplemental Content