What is the structure of the HTTP response?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.