HTTP message Format

Source: Internet
Author: User

The HTTP response message format is mainly divided into the following 4 parts:


1, status line

2. Response Head

3, empty line

4. Response body

One, the status line consists of 3 parts, namely: HTTP protocol version, status code, status code description

The status code is 3 digits, starting with 1, 2, 3, 4, and 5, 2 starts with a successful response, 3 starts with a redirect, 4 refers to a client error, and 5 starts with a server error. Detailed status codes are not introduced, here are a few common examples:

200: Successful response

400: Bad request, the user sent an incorrect HTTP request

404: File does not exist, that is, HTTP request URI error

500: Server Internal Error

2, the response header is similar to the request header, and contains a lot of useful information

3, blank line, this line is very important, necessary , indicating that the response to the end of the head, followed by the response body

4, response body, document returned by the server, most common for HTML pages

Response Example:



HTTP message Format

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.