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.