Hello friends welcome to my today’s post. Today we are going to learn a new and interesting topics called Status Code. These codes also known as Hyper Text Transfer Protocol Response Status Code. That means by using this code we can measure response of any HTTP request. There are five classes of response code and first digit of response code determine the class of response. Also they have individual meanings and uses.
So, Have a look on five classes of response code –
Class 1: 1XX (Use for informational status)
Class 2: 2XX (Use for success status)
Class 3: 3XX (Use for redirection status)
Class 4: 4xx (Use for client error status)
class 5: 5xx (Use for server error status)
So, lets go in depth of this status codes and their branches.
– Classification of Class 1XX Status Codes:
– Status Code 100(Continue): This status code confirms the client about the arrival of the first part of the request and informs to continue with the rest of the request or ignore if the request has been fulfilled
– Status Code 101(Switching Protocols): Informs the client about the server switching the protocols to that specified in the Upgrade message header field during the current connection.
– Classification of Class 2XX Status Codes:
– Status Code 200(OK): Standard response for successful requests.
– Status Code 201(Created): Request fulfilled and new resource created.
– Status Code 202(Accepted): Request accepted, but not yet processed.
– Status Code 203(Non-Authoritative Information): Returned meta information was not the definitive set from the origin server.
– Status Code 204(No Content): Request succeeded without requiring the return of an entity-body.
– Status Code 205(Reset Content): Request succeeded but require resetting of the document view that caused the request.
– Status Code 206(Partial Content): Partial GET request was successful.
– Classification of Class 3XX Status Codes:
– Status Code 300(Multiple Choices): Requested resource has multiple choices at different locations..
– Status Code 301(Moved Permanently): Resource permanently moved to a different URL.
– Status Code 302(Found): Requested resource was found under a different URL but the client should continue to use the original URL.
– Status Code 303(See Other): Requested response is at a different URL and can be accessed only through a GET command.
– Status Code 304(Not Modified): Resource not modified since the last request.
– Status Code 305(Use Proxy): Requested resource should be accessed through the proxy specified in the location field.
– Status Code 306(No Longer Used): Reserved for future use.
– Status Code 307(Temporary Redirect): Resource has been moved temporarily to a different URL.
– Classification of Class 4XX Status Codes:
– Status Code 400(Bad Request): Syntax of the request not understood by the server.
– Status Code 401(Not Authorized): Request requires user authentication.
– Status Code 402(Payment Required): Reserved for future use.
– Status Code 404(Not Found): Document or file requested by the client was not found.
– Status Code 405(Method Not Allowed): Method specified in the Request-Line was not allowed for the specified resource.
– Status Code 406(Not Acceptable): Resource requested generates response entities that has content characteristics not specified in the accept headers.
– Status Code 407(Proxy Authentication Required): Request requires the authentication with the proxy.
– Status Code 408(Request Timeout): Client fails to send a request in the time allowed by the server.
– Status Code 409(Conflict): Request was unsuccessful due to a conflict in the state of the resource.
– Status Code 410(Gone): Resource requested is no longer available with no forwarding address.
– Status Code 411(Length Required): Server doesn’t accept the request without a valid Content-Length header field.
– Status Code 412(Precondition Failed): Precondition specified in the Request-Header field returns false.
– Status Code 413(Request Entity Too Large): Request unsuccessful as the request entity is larger than that allowed by the server.
– Status Code 414(Request URL Too Long): Request unsuccessful as the URL specified is longer than the one, the server is willing to process.
– Status Code 415(Unsupported Media Type): Request unsuccessful as the entity of the request is in a format not supported by the requested resource.
– Status Code 416(Requested Range Not Satisfiable): Request included a Range request-header field without any range-specifier value.
– Status Code 417 (Expectation Failed): Expectation given in the Expect request-header was not fulfilled by the server.
– Status Code 422 (Unprocessable Entity): Request well-formed but unable to process because of semantic errors.
– Status Code 423(Locked): Resource accessed was locked.
– Status Code 424(Failed Dependency): Request failed because of the failure of a previous request.
– Status Code 426(Upgrade Required): Client should switch to Transport Layer Security.
– Classification of Class 5XX Status Codes:
– Status Code 500 (Internal Server Error): Request unsuccessful because of an unexpected condition encountered by the server.
– Status Code 501 (Not Implemented): Request unsuccessful as the server could not support the functionality needed to fulfill the request.
– Status Code 502 (Bad Gateway): Server received an invalid response from the upstream server while trying to fulfill the request.
– Status Code 503 (Service Unavailable): Request unsuccessful to the server being down or overloaded.
– Status Code 504 (Gateway Timeout): Upstream server failed to send a request in the time allowed by the server.
– Status Code 505 (HTTP Version Not Supported): Server does not support the HTTP version specified in the request.
Was this information useful? What other tips would you like to read about in the future? Share your comments, feedback and experiences with us by commenting below!