HTTP protocol-02

Source: Internet
Author: User

Get and POST requests

1,get: After the request URL? The form is followed by the parameters sent to the server, with multiple parameters separated by &, such as Http://ww.test.com/login?username=123&pwd=234&type=JSON

* Note: Due to browser and server restrictions on URL length, the parameters that accompany the URL are limited and usually cannot exceed 1KB

2,pos: The parameters sent to the server are all placed in the request body, in theory, the amount of data delivered by the post is not limited (depends on the server processing power)

Selection of Get and post

* Select the Get and post suggestions

1) If you want to pass large amounts of data, such as uploading files, you can only use POST requests

2) Get security is worse than post, if it contains confidential \ Sensitive information, it is recommended to use post

3) If you only request data (data query), we recommend the use of Get

4) If you are adding, modifying, or deleting data, it is recommended to use post

HTTP protocol-02

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.