- HTTP messages are the way that data is exchanged between the server and the client
- There are two types of messages:
- Request----------sent by the client to trigger an action on a server
- Response----------reply from the server
- Parameter document: Https://developer.mozilla.org/zh-CN/docs/Web/HTTP (Web technical document →HTTP)
- The composition of the HTTP request: Start line, Headers, body three part
The start line consists mainly of 3 elements: 1, an HTTP method, a verb (such as get, put, or post) or a noun (such as head or options) that describes the action to be performed. Shown: request Method:get;2, requesting destination (requests URL): Through is a URL, or is the absolute path of the protocol, port and domain name, 3, HTTP version, defines the structure of the remaining messages as an indicator of the desired response version; 4, Remote Address: The remote address of the request, 5, Referrer Policy (used to filter the contents of the Referrer header): The Referrer header is not passed when a demotion occurs, such as from https://to/HTTP.
Headers are primarily used to configure some parameters to improve performance and reduce server load. Very flexible, strong extensibility.
Body not necessarily all requests, general, DELETE, options do not need body, only the data sent to the server in order to update the data will require body, common is the POST request (contains HTML form data).
HTTP request of Postman