Skip to content

http response status code

Raphaël Balet edited this page Dec 6, 2023 · 2 revisions

HTTP status codes are a bunch of standardized codes which have various explanations in various scenarios. The server should always return the right status code.

1xx : Informational

@TODO

2xx : Sucess

200 Ok

Standard HTTP response representing success for GET, PUT or POST.

201 Created

Returned whenever a new instance is created. on creating a new instance, using POST method, should always return 201 status code E.g .

204 No Content

Request is successfully processed, but has not returned any content.

3xx : redirection

304 Not modified

The client has the response already in its cache. And hence there is no need to transfer the same data again.

4xx : CLient error

400 Bad Request

The request by the client was not processed, because the server could not understand what the client is asking for.

401 Unauthorized

The client is not allowed to access resources, and should re-request with the required credentials.

403 Forbidden

The request is valid and the client is authenticated, but the client is not allowed access the page or resource for some reason.

404 Not Found

The requested resource is not available now.

410 Gone

The requested resource is no longer available. it has been intentionally moved.

5xx : Server error

500 Internal Server Error

The request is valid, but the server is totally confused and the server is asked to serve some unexpected condition.

503 Service Unavailable

The server is down or unavailable to receive and process the request. Mostly if the server is undergoing maintenance.

Clone this wiki locally