😄 Introduction
Most of the web developers in the tech industry are already familiar with different HTTP response status codes, like, 200 OK, 404 NOT FOUND, and so on. These status codes are important in understanding how your HTTP request has been processed on the server side.
This quick read will help you shed light on different response status codes that HTTP supports.
If you want to learn about HTTP Request Methods first, feel free to jump to:
This way, you can easily get the idea on how your request has been processed on the server, just by looking at the first digit of the response code.
100 Continue
- Tells client that their HTTP request is authorized to continue
- Client should ignore this response if the request is already finished
101 Switching Protocols
- This code is sent in response to an Upgrade request header from the client
- Tells client the protocol, the server is switching to
103 Early Hints
- This status code tells client to start pre-loading resources while the server prepares a response or preconnect to an origin from which the page will need resources
- This status code is primarily intended to be used with the Link header
Successful Responses
300 Multiple Choices
- The request has more than one possible response and the user agent or user should choose one of them
301 Moved Permanently 🌟
- The URL of the requested resource has been changed permanently
- The new URL is given in the response.
302 Found
- This response code means that the URI of requested resource has been changed temporarily
- Further changes in the URI might be made in the future, so the same URI should be used by the client in future requests
303 See Other
- The server sent this response to direct the client to get the requested resource at another URI with a GET request
304 Not Modified
- This is used for caching purposes
- It tells the client that the response has not been modified, so the client can continue to use the same cached version of the response
307 Temporary Redirect
- Imagine 302 Found again but this time the HTTP method (i.e. GET, POST...) used in the first request must not change
308 Permanent Redirect
- Imagine 301 Moved Permanently again but with the same restriction on HTTP method change
Client Error Responses
415 Unsupported Media Type 🌟
- The media format added in the request data is not supported by the server
416 Range Not Satisfiable
- The ranges specified by the Range header field in the request cannot be fulfilled by the server
417 Expectation Failed
- Indicate that the conditions set by the client using the Expect header can not be satisfied
418 I'm a teapot ☕
- Indicate that this server has been requested to brew coffee, yet, it’s a teapot
421 Misdirected Request
- Client error sent by a server that is unable to produce a response
- The client may retry the request using another connection.
422 Unprocessable Content (WebDAV)
- The request was well-formed but was unable to be followed due to semantic errors
423 Locked (WebDAV)
- The resource that is being accessed is locked
424 Failed Dependency (WebDAV)
- The request failed due to failure of a previous dependent request
425 Too Early
- Indicates that the server is unwilling to risk processing a request that might be replayed
- Experimental
426 Upgrade Required
- Indicate that it is unwilling to process the request using the current protocol
- The server sends an Upgrade header in a this response to indicate the required protocol(s)
428 Precondition Required
- Indicate that HTTP requests of this type must be made conditionally, yet no precondition was included
429 Too Many Requests
- The user has sent too many requests in a given amount of time
431 Request Header Fields Too Large
- The server is unwilling to process the request because its header fields are too large
- The request may be resubmitted after reducing the size of the request header fields
451 Unavailable For Legal Reasons
- The user agent requested a resource that cannot legally be provided
- For example, a web page censored by a government
Server Error Responses
and learn the HTTP response status codes in a very unique way 😼
🐱🚀 Conclusion
This post might save you some time searching different web pages for getting an understanding on HTTP Response status codes.
I hope this post will help you in future, be it a help in your project or a last min study for your interview.
HAPPY CODING!!!❤️
↗ Original-Artikel auf dev.to lesenVollständiger Original-ArtikelDen kompletten Beitrag mit allen Details direkt auf dev.to lesen.
SOCIAL SHARE CARD GENERATOR