0% found this document useful (0 votes)
2 views

http status code

HTTP status codes inform clients about the outcome of their requests and are categorized into five ranges: informational (100-199), success (200-299), redirection (300-399), client errors (400-499), and server errors (500-599). Common status codes include 200 (OK), 404 (Not Found), and 500 (Internal Server Error), each indicating specific outcomes or issues with the request. Understanding these codes is essential for troubleshooting and managing web interactions.

Uploaded by

gokulprakash87
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

http status code

HTTP status codes inform clients about the outcome of their requests and are categorized into five ranges: informational (100-199), success (200-299), redirection (300-399), client errors (400-499), and server errors (500-599). Common status codes include 200 (OK), 404 (Not Found), and 500 (Internal Server Error), each indicating specific outcomes or issues with the request. Understanding these codes is essential for troubleshooting and managing web interactions.

Uploaded by

gokulprakash87
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 1

HTTP Status Codes:

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:

200 - OK The request was completed successfully.


201 - Created A resource has been created (for example a new user or new blog post).
301 - Moved This redirects the client's browser to a new webpage or tells search engines that
Permanently the page has moved somewhere else and to look there instead.
Similar to the above permanent redirect, but as the name suggests, this is only a
302 - Found
temporary change and it may change again in the near future.
This tells the browser that something was either wrong or missing in their
400 - Bad Request request. This could sometimes be used if the web server resource that is being
requested expected a certain parameter that the client didn't send.
401 - Not You are not currently allowed to view this resource until you have authorised
Authorised with the web application, most commonly with a username and password.
You do not have permission to view this resource whether you are logged in or
403 - Forbidden
not.
The resource does not allow this method request, for example, you send a GET
405 - Method Not
request to the resource /create-account when it was expecting a POST request
Allowed
instead.
404 - Page Not
The page/resource you requested does not exist.
Found
500 - Internal The server has encountered some kind of error with your request that it doesn't
Service Error know how to handle properly.
503 - Service This server cannot handle your request as it's either overloaded or down for
Unavailable maintenance.

You might also like