Returning HTTP Status Codes
Returning HTTP Status Codes: Returning HTTP Status Codes: an overview, Common HTTP Status Codes, Returning ResponseEntity<T>.
Updated
- Returning HTTP Status Codes: an overview (Apprentice): Why the default status codes (200 on success, 500 on any error) aren't enough, shown by a request for a category that doesn't exist and still gets 200.
- Common HTTP Status Codes (Apprentice): The status codes a REST API uses most, 200, 201, 204, 400, 401, 403, 404 and 500, and what each tells the client.
- Returning ResponseEntity<T> (Journeyman): Return a ResponseEntity from a controller method to choose the status code, for example 404 when a category isn't found and 500 when something fails.