From the course: Java EE: RESTful Service with JAX-RS 2.0
Unlock the full course today
Join today to access over 23,000 courses taught by industry experts.
The HTTP response
From the course: Java EE: RESTful Service with JAX-RS 2.0
The HTTP response
- [Voiceover] Providing a response is an essential part of the Restful API's role. The response must be properly formed, and contain the required information in the appropriate format. Let's look at how to construct a response and how to set the appropriate HTTP Response Code. HTTP Response Codes are sent to the client from the server in order to communicate something about what has happened on the server side. These codes are three digits long, and are split into five broad categories of responses. Those starting with the number one, indicate that the response includes information such as the server has agreed to switch protocol. Those starting two, indicate that the request has been performed successfully, and without error. Those starting three, are also success codes, but indicate that the client must perform an action, such as to redirect to another URL. Those starting with the number four, indicate that a client error has occurred. This means that the client is at fault, and has…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
The HTTP response4m 24s
-
(Locked)
Build a response3m 24s
-
(Locked)
How to handle errors3m 19s
-
(Locked)
Implement an exception manager2m 46s
-
(Locked)
Work with HATEOAS4m 21s
-
(Locked)
HATEOAS and JAX-RS2m 59s
-
(Locked)
Add HATEOAS to the resource10m 33s
-
(Locked)
Challenge: Add exception handlers19s
-
(Locked)
Solution: Add exception handlers1m 2s
-
(Locked)
-
-
-