HTTP Response Status Codes

Status codes explained with simple examples

Abhishek Singh
Javarevisited

--

Photo by AltumCode on Unsplash

[1] 1xx Informational —

100 Continue :

=> A client sends a large file to the server. Upon receiving “100 Continue,” the client proceeds to send the rest of the file.

101 Switching Protocols :

=> A client requests to upgrade from HTTP/1.1 to WebSocket protocol. Server responds with “101 Switching Protocols” to indicate the switch.

102 Processing :

=> A client submits data to the server for processing, and the server responds with “102 Processing” to inform that it’s still working on the request.

[2] 2xx Successful —

200 OK :

=> A client fetches information about a user from a server, and the server successfully responds with the requested user data.

201 Created :

=> A client sends a POST request to create a new user account. The server responds with “201 Created” after successfully creating the account.

204 No Content :

=> A client sends a DELETE request to remove a resource. The server processes the request…

--

--

Abhishek Singh
Javarevisited

I am a senior software engineer. I love to write articles on java. Follow me on LinkedIn - https://in.linkedin.com/in/abhishek-singh-java