HTTP Response codes

Pricilla Bilavendran
4 min readNov 12, 2020

If you are into API Testing recently, its good to have an understanding about the API response codes. A good API will be able to handle the response codes appropriately.

Let’s have a look at the commonly used response codes:

200 (OK):

It indicates that the REST API successfully carried out whatever action the client requested and that no more specific code in the 2xx series is appropriate. The 200 response should include a response body. The information returned with the response is dependent on the method used in the request, for example:

GET an entity corresponding to the requested resource is sent in the response;

HEAD the entity-header fields corresponding to the requested resource are sent in the response without any message-body;

POST an entity describing or containing the result of the action;

TRACE an entity containing the request message as received by the end server.

201 (Created):

A REST API responds with the 201 status code whenever a resource is created. There may also be times when a new resource is created as a result of some…

--

--

Pricilla Bilavendran
Pricilla Bilavendran

No responses yet