Friday, 29 February 2008

Clear Concise HTTP Status Codes List

I've recently been looking into ReST services, and needless to say you need to know your HTTP status codes. These are a set of standardised response codes given by web site servers on the Internet. The codes help identify the cause of the problem when a web page or other resource does not load properly. Here is a concise list for reference purposes.

 Information                    # 1xx
    Continue                       # 100
    SwitchProtocl                  # 101
 Success                        # 2xx
    OK                             # 200
    Created                        # 201
    Accepted                       # 202
    NonAuthoritativeInformation    # 203
    NoContent                      # 204
    ResetContent                   # 205
    PartialContent                 # 206
 Redirection                    # 3xx
    MultipleChoice                 # 300
    MovedPermanently               # 301
    Found                          # 302
    SeeOther                       # 303
    NotModified                    # 304
    UseProxy                       # 305
    TemporaryRedirect              # 307
 ClientError                    # 4xx
    BadRequest                     # 400
    Unauthorized                   # 401
    PaymentRequired                # 402
    Forbidden                      # 403
    NotFound                       # 404
    MethodNotAllowed               # 405
    NotAcceptable                  # 406
    ProxyAuthenticationRequired    # 407
    RequestTimeOut                 # 408
    Conflict                       # 409
    Gone                           # 410
    LengthRequired                 # 411
    PreconditionFailed             # 412
    RequestEntityTooLarge          # 413
    RequestURITooLong              # 414
    UnsupportedMediaType           # 415
    RequestedRangeNotSatisfiable   # 416
    ExpectationFailed              # 417
 ServerError                    # 5xx
    InternalServerError            # 500
    NotImplemented                 # 501
    BadGateway                     # 502
    ServiceUnavailable             # 503
    GatewayTimeOut                 # 504
    VersionNotSupported            # 505

To get more info on these codes check out the w3.org page on Status Code Definitions.

No comments: