What is the HTTP

HTTP: a hypertext transfer protocol that instructs the browser and server in how to communicate.

HTTP requests and request headers

HTTP response and response header and content

  • curl -d “1234567890” -s -v -H “Key: xxx” — “www.baidu.com”
  • The above is the format of the command line response, where -d “1234567890” and -h “Key: XXX “are required.
  • The red areas are:
  1. The first part of the request: POST +/+HTTP/1.1(good version)
  2. The second part of the request: key:value
  3. The third part of the request: Spaces are used to delimit 2 and 4 parts
  4. Part four of the request: The content of the request

  • Developer tools F12 view
  1. Browser – Developer tools -NETWORK
  2. Enter the website www.baidu.com/
  3. Find the picture post

4. Click to view request header, response header, and response preview5. In the request header as shown in Section 1/2 below; Part four responses are viewed in the response header and response preview