Posts

Showing posts from March, 2018

Rest API automation using HTTP Client

Image
HTTP Response Status Codes - HTTP defines forty standard status codes that can be used to convey the results of a client’s request. The status codes are divided into the five categories presented below. 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. Unlike the 204 status code, a 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 cr