A basic knowledge of reptiles

Understanding of HTTP, HTTPS

1.http: Hypertext Transfer Protocol

  • Transmitted in plaintext
  • More efficient, but not safe

2.https: http + ssl (Secure Sockets Layer)

  • Before transmission data is first encrypted and then decrypted to obtain the content
  • Low efficiency, but safety

3.get request and the difference between the post request

  • get request does not request body, post there, into the get request url address data;
  • Login Register commonly used in post requests confidentiality;
  • post requests get request carries data than larger more commonly used when the transmission of large text.

Request 4.http Agreement

  • 1. Request line
    GET /8hr/page/1/ HTTP/1.1
  • 2. The request body
    • User-Agent: User-agent: the other server can know the current request by user_agent other resources is what browser
      • If we need to simulate mobile version of the browser sends a request, the corresponding need to change the user-agent mobile version
    • Cookie: the user to store user information, each request will be sent to carry the browser on the other side
      • To obtain a login to access the page
      • The other servers will be judged by our cookie is a reptile
    • Referer: the origin of the current page, usually on a url
  • 3. The request body
    • Carry data
    • did not get request
    • There are post requests    

In response 5.http Agreement

  • 1. Response Header
    • Set-Cookie: server cookie to each other through the local field is set
  • 2. Response Body
    • url addresses corresponding response

 

Guess you like

Origin www.cnblogs.com/-chenxs/p/11415289.html