Skip to main content

HTTP Status Codes

Learn HTTP Status Codes (REST API with Spring MVC, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes HTTP status codes are three-digit numbers that tell the client the result: 2xx success, 3xx redirect, 4xx client error, 5xx server error. Common REST codes : 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 500 Internal Server Error. In Spring set them with ResponseEntity , @ResponseStatus or ResponseStatusException , using the HttpStatus enum.

More lessons in REST API with Spring MVC