HTTP method: The difference between a GET request and a POST request

Source: Internet
Author: User

Get is a request to send data to the server, and post is a request to submit data to the server
Get is to get information, not modify information, like database query function, data will not be modified
Get
The requested parameters will be passed after the URL, the requested data will be appended to the URL, to split the URL and transfer data, the parameters are connected with &,%xx in XX for the symbol to 16 in
ASCII, if the data is an English letter/number, is sent as is, if it is a space, converted to +, if it is Chinese/other characters, the string is directly encrypted with BASE64.
The data for a get transfer has a size limit, because get is submitting data through a URL, so the amount of data that get can commit is directly related to the length of the URL, and different browsers have different limits on the length of the URL.
Get request data will be cached by the browser, the user name and password will appear in plaintext on the URL, others can find historical browsing records, the data is not very safe. On the server side, use Request.QueryString to get the data submitted by the Get method
Post
The request is sent to the Web server as the actual content of the HTTP message, and the data is placed in the HTML
Within the header, post does not limit the submitted data. Post is safer than get, when the data is in Chinese or not sensitive data, then use GET, because using GET, parameters are displayed in the ground
Data for sensitive data and not Chinese characters, use post
Post represents a request that may modify resources on the server, and the data submitted by post can only be obtained by using Request.Form on the server side.

http://blog.csdn.net/yipiankongbai/article/details/24025633

HTTP method: The difference between a GET request and a POST request

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.