Open Security2431 opened 11 months ago
๐๐ผ๐ ๐ฑ๐ผ ๐๐ง๐ง๐ฃ ๐๐๐ฎ๐๐๐ ๐ฐ๐ผ๐ฑ๐ฒ๐ ๐๐ผ๐ฟ๐ธ, ๐ฎ๐ป๐ฑ ๐๐ต๐ถ๐ฐ๐ต ๐ฎ๐ฟ๐ฒ ๐บ๐ผ๐๐ ๐ถ๐บ๐ฝ๐ผ๐ฟ๐๐ฎ๐ป๐?
When a server receives a request from a client, it provides a response that includes both the requested data and a 3-digit ๐๐๐ฎ๐๐๐ ๐ฐ๐ผ๐ฑ๐ฒ that succinctly ๐ฐ๐ผ๐บ๐บ๐๐ป๐ถ๐ฐ๐ฎ๐๐ฒ๐ ๐๐ต๐ฒ ๐ฟ๐ฒ๐พ๐๐ฒ๐๐'๐ ๐ผ๐๐๐ฐ๐ผ๐บ๐ฒ ๐ผ๐ฟ ๐๐๐ฎ๐๐๐.
Clients use these standardized sets of codes to determine if a request has been properly handled, whether more action is required, or whether an error has occurred.
HTTP status codes are ๐ฑ๐ถ๐๐ถ๐ฑ๐ฒ๐ฑ ๐ถ๐ป๐๐ผ ๐ณ๐ถ๐๐ฒ ๐ฐ๐ฎ๐๐ฒ๐ด๐ผ๐ฟ๐ถ๐ฒ๐, each ๐ถ๐ฑ๐ฒ๐ป๐๐ถ๐ณ๐ถ๐ฒ๐ฑ ๐ฏ๐ ๐๐ต๐ฒ ๐ณ๐ถ๐ฟ๐๐ ๐ฑ๐ถ๐ด๐ถ๐ ๐ผ๐ณ ๐๐ต๐ฒ ๐ฐ๐ผ๐ฑ๐ฒ:
๐ฃ ๐๐ป๐ณ๐ผ๐ฟ๐บ๐ฎ๐๐ถ๐ผ๐ป๐ฎ๐น (๐ญ๐ ๐ ): The request was received, and the process is continuing. ๐ข ๐ฆ๐๐ฐ๐ฐ๐ฒ๐๐ (๐ฎ๐ ๐ ): The request was successfully received, understood, and accepted. ๐ต ๐ฅ๐ฒ๐ฑ๐ถ๐ฟ๐ฒ๐ฐ๐๐ถ๐ผ๐ป (๐ฏ๐ ๐ ): The request needs further action to be completed. ๐ ๐๐น๐ถ๐ฒ๐ป๐ ๐ฒ๐ฟ๐ฟ๐ผ๐ฟ (๐ฐ๐ ๐ ): The request contains incorrect syntax or cannot be fulfilled by the server. ๐ด ๐ฆ๐ฒ๐ฟ๐๐ฒ๐ฟ ๐ฒ๐ฟ๐ฟ๐ผ๐ฟ (๐ฑ๐ ๐ ): The server failed to fulfil a valid request.
You can learn more about status codes here: https://lnkd.in/gDq8fMDt
๐ง๐ต๐ฒ ๐บ๐ผ๐๐ ๐ถ๐บ๐ฝ๐ผ๐ฟ๐๐ฎ๐ป๐/๐ฐ๐ผ๐บ๐บ๐ผ๐ป ๐ณ๐ผ๐ฟ ๐ฒ๐ฎ๐ฐ๐ต ๐ฐ๐ฎ๐๐ฒ๐ด๐ผ๐ฟ๐ ๐ฎ๐ฟ๐ฒ ๐น๐ถ๐๐๐ฒ๐ฑ ๐ถ๐ป ๐๐ต๐ฒ ๐๐ถ๐๐๐ฎ๐น ๐ฏ๐ฒ๐น๐ผ๐.
Server ๐๐๐ฎ๐๐๐ ๐ฐ๐ผ๐ฑ๐ฒ๐ for HTTP ๐๐ฒ๐ฟ๐๐ฒ ๐๐ฒ๐๐ฒ๐ฟ๐ฎ๐น ๐ธ๐ฒ๐ ๐ณ๐๐ป๐ฐ๐๐ถ๐ผ๐ป๐ in web development including:
๐ธ Efficient communication ๐ธ Reliability and troubleshooting ๐ธ Error identification ๐ธ Facilitating automation ๐ธ Providing user feedback ๐ธ And much moreโฆ
Below are some ๐ฏ๐ฒ๐๐ ๐ฝ๐ฟ๐ฎ๐ฐ๐๐ถ๐ฐ๐ฒ๐ ๐ณ๐ผ๐ฟ ๐๐ผ๐ฟ๐ธ๐ถ๐ป๐ด ๐๐ถ๐๐ต ๐๐๐ฎ๐๐๐ ๐ฐ๐ผ๐ฑ๐ฒ๐:
๐น ๐จ๐๐ฒ ๐๐ฝ๐ฒ๐ฐ๐ถ๐ณ๐ถ๐ฐ ๐๐๐ฎ๐๐๐ ๐ฐ๐ผ๐ฑ๐ฒ๐: Use the most specific status code that accurately describes the outcome of an operation. ๐น ๐๐ฒ ๐ฐ๐ผ๐ป๐๐ถ๐๐๐ฒ๐ป๐: Maintain consistency in how you use status codes across your application. ๐น ๐๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐ ๐ฐ๐๐๐๐ผ๐บ ๐ฒ๐ฟ๐ฟ๐ผ๐ฟ ๐บ๐ฒ๐๐๐ฎ๐ด๐ฒ๐: Send additional info in the response body or headers to provide more context. ๐น ๐๐ผ๐ด ๐ฎ๐ป๐ฑ ๐บ๐ผ๐ป๐ถ๐๐ผ๐ฟ: Logging and monitoring of the status codes your app is sending and receiving can help in performance tuning, detecting anomalies, and debugging.
Although HTTP status codes may seem like a small and simple aspect of web development, they play an indispensable role in client, server communication. Understanding and utilizing the status codes effectively is a fundamental part of developing sound applications.
~~ A big thank you to our partner Kickresume who keeps our content free to the community.
๐ Build a winning resume (without spending all day). Kickresume has templates used by people hired at Google, Microsoft, and more (industry-specific & ATS-friendly).
Good to know:
TODO:
Additional Information: