Wednesday, May 16, 2012

HTTP Status Codes

The following is a list of Hypertext Transfer Protocol (HTTP) response status codes.

The first digit of the status code specifies one of five classes of response; the bare minimum for an HTTP client is that it recognises these five classes.

1xx Informational
Request received, continuing process.
eg. 100 Continue
This means that the server has received the request headers, and that the client should proceed to send the request body

2xx Success
This class of status codes indicates the action requested by the client was received, understood, accepted and processed successfully.
eg. 200 OK
Standard response for successful HTTP requests.

3xx Redirection
The client must take additional action to complete the request.This class of status code indicates that further action needs to be taken by the user agent in order to fulfil the request.
eg. 301 Moved Permanently
This and all future requests should be directed to the given URI.

4xx Client Error
The 4xx class of status code is intended for cases in which the client seems to have erred.
eg.
400 Bad Request
The request cannot be fulfilled due to bad syntax.
401 Unauthorized
Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided

5xx Server Error
The server failed to fulfill an apparently valid request.Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has encountered an error or is otherwise incapable of performing the request.

eg. 500 Internal Server Error
A generic error message, given when no more specific message is suitable

No comments:

Post a Comment