In this article, we will discuss all about HTTP and its response status codes uses in web development.
let’s get started…
What is HTTP?
HTTP stands for Hypertext Transfer Protocol.
The Hypertext Transfer Protocol is an application layer protocol for distributed, collaborative, hypermedia information systems.Wikipedia
Basically, HTTP is a client-server protocol, which acts as the foundation of any data exchange on the Web.
Each interaction between the client and server is called a message.
HTTP messages are requests or responses. Client devices submit HTTP requests to servers, which reply by sending HTTP responses back to the clients.
What is Status code?
When we make any client client request, the server responds with a code that helps to communicate the status of the request.
Here we listed some most important HTTP Status Code list below:
2XX - Success
200-Ok : 200 is the most common response HTTP code which means every request we made from client side to server side has become successful, that why we received 200 response.
201 - Created: The request has been fulfilled, resulting in the creation of a new resource.
202 - Accepted: This code indicates that the server has received and is processing the request, but no response is available yet.
204 - No Content: The server successfully processed the request, and is not returning any content
3XX - Redirection
301 - Moved Permanently: 301 status code means the web page has been moved to another URL
302 - Moved Temporary: The page has been temporarily moved to another URL and its URL can be changed in the future.
305 - Use Proxy: The requested resource is available only through a proxy
307 - Temporary Redirect: The response code indicates that the requested resource has been temporarily moved to another URI. however, future requests should still use the original URI.
4XX - Client errors
400 - Bad Request: The server cannot or will not process the request due to wrong syntax causing an error
401 - Unauthorized: Specifically for use when authentication is required and has failed or has not yet been provided.
403 - Forbidden: The request contained valid data and was understood by the server, but the server is refusing action. It's possible that the server might not have permission to share the file with the client.
404 - Not Found: The page you are trying to open is not available on site, the page may be deleted or transferred to another URL.
429 - Too Many Requests : When there is a lot of traffic to a website, the site stops working due to a lot of requests an then send 429 error.
5XX - Server errors
500 - Internal Server Error: Your site has a server-side problem. There is a problem with your server so your site is not working.
502 - Bad Gateway: The server acts as a gateway and received an invalid response from the server while making the request.
503 - Service Unavailable: 503 is not a mistake but deliberately single. This means that you are not allowed to see this page.
Thanks for reading.
Do let me know If you face any difficulties please feel free to comment below we love to help you. if you have any feedback suggestion then please inform us by commenting.