http status code
http status code
In the previous task, you learnt that when a HTTP server responds, the first line always contains a
status code informing the client of the outcome of their request and also potentially how to handle
it. These status codes can be broken down into 5 different ranges:
These are sent to tell the client the first part of their request has been
100-199 - Information
accepted and they should continue sending the rest of their request. These
Response
codes are no longer very common.
This range of status codes is used to tell the client their request was
200-299 - Success
successful.
These are used to redirect the client's request to another resource. This can
300-399 - Redirection
be either to a different webpage or a different website altogether.
400-499 - Client
Used to inform the client that there was an error with their request.
Errors
500-599 - Server This is reserved for errors happening on the server-side and usually indicate
Errors quite a major problem with the server handling the request.
Common HTTP Status Codes:
There are a lot of different HTTP status codes and that's not including the fact that applications can
even define their own, we'll go over the most common HTTP responses you are likely to come
across: