The browser and the site server have a conversation in the form of HTTP status codes. The server gives responses to the browser’s request in the form of a three-digit code known as HTTP status codes. The categorization of HTTP status codes is done in five sections which are listed below.
- Informational responses (100–199)
- Successful responses (200–299)
- Redirects (300–399)
- Client errors (400–499)
- Server errors (500–599)
Client Error Responses:
- 400 Bad Request: This response code occurs when the server could not understand the request because an invalid syntax is used.
400 Bad Request
- 401 Unauthorized: This response code occurs when the server refuses to respond to the request because the request lacks client authentication to get the resources.
- 402 Payment Required: The response code 404 is reserved for future use. The aim of creating this response code is for the digital payment system.
402 Payment Required
- 403 Forbidden: This response code occurs when the client wants to access the content but it does not have the right to access the content as it is unauthorized.
- 404 Not Found: This response code occurs when the server cannot find the resources requested by the client. This code can also be sent by the server instead of error 403 to hide the resources from the unauthorized client. Error 404 is one of the most famous response codes on the web.Status:
404 Not Found
- 405 Method Not Allowed: This response code occurs when the server knows the method of the request but currently it has been disabled by the server.
405 Method Not Allowed
- 406 Not Acceptable: This response code occurs when the server does not find the content mentioned in the client request.
406 Not Acceptable
- 407 Proxy Authentication Required: This response code occurs when it is necessary for the client to authenticate itself with the proxy.
407 Proxy Authentication Required
- 408 Request Timeout: This response code occurs when the webserver did not receive the required response within the time that it was prepared to wait.
408 Request Timeout
- 409 Conflict: This response code occurs when the server could not complete the request due to conflict in the target resource. The client can resubmit the request by resolving the conflict.
- 410 Gone: This response code occurs when the requested resource is permanently deleted from the server and is no longer available.
- 411 Length Required: This response code occurs when the server rejects the request as the request did not have a defined “Content-Length”.
411 Length Required
- 412 Precondition Failed: This response code occurs when the server evaluates the preconditions given in the request header as false.
412 Precondition Failed
- 413 Request Entity Too Large: This response code occurs when the server refuses to process the request because the request entity is larger than the server’s ability to process the data.
413 Request Entity Too Large
- 414 Request-URI Too Long: This response code occurs when the client’s requested URI is longer than the ability of the server to interpret the URI.
414 Request-URI Too Long
- 415 Unsupported Media Type: This response code occurs when the server rejects the requested resource because the media format of the requested resource is not supported by the server.Status:
415 Unsupported Media Type
- 416 Requested Range Not Satisfiable: Response code occurs when the request cannot be completed because of the range specified in the Range Header. The range can also be outside the target URI’s data.
416 Requested Range Not Satisfiable
- 417 Expectation Failed: This response code occurs when the server can’t meet the expectation indicated by the Expect request-header field.
416 Requested Range Not Satisfiable
Supported Browsers: The browsers compatible with the HTTP status code Client Error Responses are listed below:
- Google Chrome
- Internet Explorer
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.