HTTP Response Code

I have good hands-on building REST services using Java Play Framework / Spring Boot / Spark

We build multiple microservices most of them are client-server architecture and in these scenarios apart from gRPC we use REST services for the microservice communications

If you ask me do we need all 70 Status provided by HTTP standards, the answer is NO, We don’t need ’em all for all Situations

I Architected the REST APIs for our Cloud Data Protection software Nimesa, I didn’t use them all, we use only 10 of them and it serves our purpose

200 – OK – Everything is working
201 – OK – New resource has been created
204 – OK – The resource deleted successfully
304 – Not Modified – The client can use cached data for some static responses
400 – Bad Request – The request was invalid or cannot be served. The input validation failed
401 – Unauthorized – The request requires a user authentication
403 – Forbidden – The server refused the request.
404 – Not found – There is no resource behind the URI.
500 – Internal Server Error – Any error occurred in the global try-catch block.

Also published on Medium.

This site uses Akismet to reduce spam. Learn how your comment data is processed.