HTTP message is information used for HTTP protocol interaction. The HTTP message on the requesting end is called a request message, and the responding end is called a response message. The HTTP message itself is a string text composed of multiple lines of data. HTTP The message is divided into a message header and a message body, usually separated by blank lines.
HTTP message
The information used for HTTP protocol interaction is called HTTP message. The HTTP message on the requesting side is called a request message, and the HTTP message on the responding side is called a response message. The HTTP message itself is a string text composed of multiple lines (using CR LF as line breaks).
HTTP messages are divided into message header and message body, usually separated by blank lines. Usually there is no need to have a message body.
The structure of the message
The request line consists of method, URI and protocol version .
The status line consists of status code, reason and protocol version.
There are also header fields: general header, request header, response header and entity header.
The above is the detailed content of What is an HTTP message?. For more information, please follow other related articles on the PHP Chinese website!