HTTP packet,

Source: Internet
Author: User

HTTP packet,
HTTP packets

How does a message flow?

1. an HTTP packet is a data block sent between HTTP applications. It starts with metadata in the form of text. This information describes the content and meaning of the message, the optional data section follows. These packets flow between the client, server, and proxy. "Inbound", "outbound", "upstream", and "downstream" are used to describe the packet direction.

2. All packets flow downstream, and all the message senders are upstream of the receiver.

 

Three parts of an HTTP packet (starting line, header, and entity)

Each message contains a request from the client or a response from the server. It consists of the start line, header, and optional body parts that describe the packet.

Request Message format:<Method> <request-URL><Version>

<Headers>

 

<Entity-body>

Response Message format

<Version><Status> <reason-phrase>

<Headers>

 

<Entity-body>

Start line:The request message describes what the message is going to do and the Response Message describes what happened. The following table lists common HTTP methods.

The following table lists the status codes.

The version number will appear in the form of HTTP/x. y, which provides an HTTP application with a way to notify the other party of the Protocol version it complies. The version number indicates the maximum HTTP Version supported by the application. It should be noted that HTTP1.22 is higher than HTTP1.3. Because 22> 3.

Header: A list of some name/value pairs. The header can be divided into the following categories: general header, request header, Response Header, entity header, and extension header.

 

 

Entity:Is the content to be transmitted over HTTP.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.