четвер, 28 січня 2016 р.

HTTP Status Codes

Sr. No.HTTP CodeDescription
1200OK, shows success.
2201CREATED, when a resource is successful created using POST or PUT request. Return link to newly created resource using location header.
3204NO CONTENT, when response body is empty for example, a DELETE request.
4304NOT MODIFIED, used to reduce network bandwidth usage in case of conditional GET requests. Response body should be empty. Headers should have date, location etc.
5400BAD REQUEST, states that invalid input is provided e.g. validation error, missing data.
6401UNAUTHORIZED, states that user is using invalid or wrong authentication token.
7403FORBIDDEN, states that user is not having access to method being used for example, delete access without admin rights.
8404NOT FOUND, states that method is not available.
9409CONFLICT, states conflict situation while executing the method for example, adding duplicate entry.
10500INTERNAL SERVER ERROR, states that server has thrown some exception while executing the method.

Немає коментарів:

Дописати коментар