The HTTP response consists of three parts:
Status code: Describes the status of the response. Can be used to check whether the request was completed successfully. In the case of a request failure, the status code can be used to identify the cause of the failure. If the servlet does not return a status code, a successful status code of HTTPSERVLETRESPONSE.SC_OK is returned by default.
HTTP headers (HTTP header): They contain more information about the response. For example, the header can specify an expiration date that the response expires, or an encoding format that specifies the content of the transport entity that is used to secure the user. How to retrieve HTTP headers in Serlet look here.
Body: It contains the contents of the response. It can contain HTML code, pictures, and so on. A principal is made up of data bytes that are transmitted immediately behind the head in an HTTP message.
Specific explanation can refer to my other blog "Deep Parsing http protocol"
What is the structure of the HTTP response?