After receiving and processing a request, the server sends back a HTTP response message. These messages have a standardized structure. They contain a wealth of information, with the most important pieces being the status code, the headers, and the body.
Handling HTTP responses
HTTP status codes
The status code is a three-digit integer where the first digit represents the category, while the next two digits are used to define the subcategory. They are as follows:
- 1XX - Informational: Request was received. This indicates a provisional response.
- 2XX - Success: This is the most important response status, acknowledging that the request was successfully received, understood, and accepted. It's what we're looking for in...