Request format

Http requests consist of 4 parts of the requested line, requested head, empty line and requested package
We're here to learn that http can use the fiddler grab kit presented by the blogger in his last blog to access the machine's http requests and responses
Http requests will be analysed in four ways:
Url method request header text know url
Our commonly known "web site" is actually a url.
Every file on the internet has a unique url, which contains information indicating the location of the file and how the browser should handle it.
A url is presented as follows:

Let's grab a bag to see where the url is

Note: this request is not in the text
Omitted portion of url
♪ query string ♪
Query string contains key-to-structure values. Key and value values and numbers are all agreed by the program itself. We can customize the information we need to the server
About url encode
The characters like / : etc. Have been understood by url as having a special meaning, so they cannot appear at will.
For example, if a given parameter requires these special characters, it must be transposed first.
A chinese character is made up of a combination of utf-8 or gbk, although there is no special meaning in urls, but there is still a need for transliteration. Otherwise, the browser may use a byte of the utf-8/gbk code as a special symbol in urls.
The rules for conversion are as follows: the transcoded characters will need to be converted to 16 digit, followed by 4 bits from right to left (less than 4 bits directly processed), one for every 2 places, followed by % encoded in %xy format
Awareness of “method”
There are several types of methods:

The most common of these are get, post, and others are rarely used
Get methodology

Get is the most commonly used http method.
Enter the url directly in the browser, at which point the browser sends a get request.
Also, l of HTMLOkay, img, sCript etc. Will trigger the get request
Features of the get request
Post method
The post method is also a common one.
Construct post requests through the form tab in HTML, or use javasAjax of cript can also construct post requests.

Characteristics of post requests
The difference between get and post
Essentially no difference:
There is a difference in usage:
Request for recognition “header” (header)
The overall format of the header is also the key pair structure.
Each key is divided by a semicolon between the key and the value.
There are many types of reporters, only a few common ones here
Host
Identify the address (and port) of the server that will eventually be visited
Although a domain name has been written in the url, usually both are the same, but if not directly, but via proxy access to the server, the two are different
Content-length
Is the length of the data in body in bytes
If the request is received by the get method, there is usually no bobby, so this key is not shown correctly
Content-type
Expressing the requested body format
Common options:
Title=test



