Câu trả lời What are the core components of a HTTP response?
The core components of an HTTP response are:
Status Line: This is the first line of the HTTP response and contains three key elements:
HTTP Version: Indicates the HTTP protocol version used, such as HTTP/1.1.
Status Code: A three-digit code that indicates the result of the HTTP request. Common status codes include 200 (OK), 404 (Not Found), and 500 (Internal Server Error).
Reason-Phrase: A brief textual description of the status code, such as "OK" for 200 or "Not Found" for 404[1][2][3].
Headers: These provide additional information about the response. Headers are key-value pairs separated by a colon and can include:
Content-Type: Specifies the media type of the response body, such as text/html or application/json.
Content-Length: Indicates the size of the response body in bytes.
Date: The date and time at which the response was generated.
Server: Information about the server that generated the response.