The difference between the two common methods of iOS-network requests: GET & amp; POST

Source: Internet
Author: User

 

-Add the data in the form of variable = value to the URL pointed to by the action, and use "?" Connection, and the variables are connected with "&"-insecure, because the data is stored in the requested URL during transmission-the amount of data transmitted is small, mainly because the URL length is limited.

1> Get requests Get data directly from the server

High Efficiency

 

All parameters are displayed in the address bar, which is visually less secure.

 

Because Get does not submit data to the server, the actual security is high.

 

Practical Application: Data Query

 

 

-All data is invisible to users-a large amount of data can be transmitted, and only Post can be used to upload files.

2> for Post requests, you must first obtain a data body and submit it to the server to obtain the server response.

Poor performance

Low Efficiency

 

Parameters are not displayed in the address bar, which is intuitive and highly secure.

 

Because the Post request will submit data to the server, there may be security vulnerabilities, and the actual security is not high

 

Practical Application: Post operations are required only for user login and file upload operations that require data interaction with the server.

 

 

• GET • POST Data Interaction diagram: there is nothing to mention. I hope you can add something and learn from each other! Thanks/clear Saup

Related Article

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.