In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
In this issue, the editor will bring you about the components of the HTTP message. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
The HTTP message consists of three parts: 1, the starting line of the description of the message [start line]; 2, the header [header] block that contains attributes; and 3, the optional body [body] part that contains data.
The HTTP message consists of three parts:
The starting line that describes the message (start line)
Header (header) block containing attributes
And an optional body section that contains the data.
Related learning recommendation: PHP programming from beginner to proficiency
This is the format of the request message:
/ / is to provide some additional information for the server
This is the format of the response message (note that only the syntax of the starting line is different):
/ / provide some additional information for the client
The following is a brief description of each part.
1. Method (method)
The action that the client wants the server to perform on the resource. Is a separate word, such as GET, HEAD, or POST. The method is described in more detail later in this chapter.
2. Request URL (request-URL)
Name the requested resource, or the full URL of the URL path component. If you talk directly to the server, as long as the path component of the URL is the absolute path to the resource, there is usually no problem-- the server can assume that it is the host / port of the URL. Chapter 2 introduces the syntax of URL in detail.
3. Version (version)
Status code (status-code)
These three digits describe what happened during the request. The first digit of each status code is used to describe the general category of status ("success", "error", and so on). A complete list of status codes and their meanings defined by the HTTP specification is provided later in this chapter.
4. Causative phrase
A readable version of the numeric status code that contains all text before the line termination sequence. Examples of reason phrases for all status codes defined by the HTTP specification are provided later in this chapter. The reason phrase is meaningful only to humans, so, for example, although the meaning of the reason phrase in the response line HTTP/1.0 200 NOT OK and HTTP/1.0 200 OK is different, it is also treated as a success indicator.
5. First part
There can be zero or more headers, each containing a name, followed by a colon (:), followed by an optional space, followed by a value, and finally a CRLF. The header ends with a blank line (CRLF), indicating the end of the header list and the beginning of the entity body. Some versions of HTTP, such as HTTP/1.1, require that a valid request or response message must contain a specific header. The various HTTP headers will be discussed later in this chapter.
6. The body part of the entity (entity-body)
The body part of the entity contains a block of arbitrary data. Not all messages contain the body of the entity, and sometimes the message ends with a CRLF
/ / tell the server which media types can be sent
/ / tell the server what encoding you can send
These are the components of the HTTP message shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.