What are the characteristics of the HTTP protocol and the difference between a network request get and POST?

Source: Internet
Author: User
  • What are the features of the HTTP protocol:
  1. HTTP Hypertext Transfer Protocol, is a short connection, is the client actively sends the request, the server responds, the server responds after the connection disconnects
  2. HTTP is an application-level protocol to objects, HTTP has 2 types of messages: Request messages and response messages
  3. HTTP request message: An HTTP request message, consisting of 4 parts of the request line, the request header, the blank line, and the request row data
  4. HTTP response message: Consists of three parts: status line, message header, response body

   

  • The difference between a network request get and POST
GET Request: Parameter stitching after address no request data is unsafe (because all parameters are stitched behind the address), not suitable for transmitting large amounts of data (limited, 1024 bytes) POST request: The parameter is more secure in the request data area than the GET request, and there is no limit to the size of the data. The data submitted in the <request> of the HTTP package will be displayed in the Address bar, and the post submission Address bar will change. When the size of the transfer data get committed, the transmitted data is limited by the URL length POST because it is not transmitted by URL theoretically unrestricted security: Post security is more secure than get, and a get-committed data user name and password will appear in plaintext in the URL For example, the login interface may be cached by the browser. Synchronous and asynchronous differences: Synchronous Link: The main thread to request data, when the data request is complete, other threads are not responding, will cause the program on the phenomenon of suspended animation.
Asynchronous Link: will open a separate thread to handle the network request, the main thread is still in an interactive state, the program runs smoothly.

What are the characteristics of the HTTP protocol and the difference between a network request get and POST?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.