From http://blog.csdn.net/jilily/article/details/3935514
--------------------------------------------
A Brief IntroductionGetAndPost
L get: obtains the information of the resource specified by the request URI in Entity mode. If the request URI is only a data generation process, in the end, the response object will return the resource to which the result of the processing process points, rather than the description of the processing process.
L post: used to send a request to the target server, requiring it to accept the entity attached to the request and treat it as an additional sub-item of the resource specified by the request URI in the Request queue, post is designed to implement the following functions in a uniform way:
1. Explanation of existing resources
2. send messages to bulletin boards, newsgroups, email lists, or similar discussion groups.
3. submit data blocks
4. Expand the database through additional operations
From the above description, we can see that get is a request to request data from the server, while post is a request to submit data to the server, the data to be submitted is located in the entity behind the information header.
HTTPRequest:GetAndPostDifferences Between Methods
Similarities;
L get and post (for "Post" requests, unless the cache-control or Expires header fields indicate that the request cannot be cached) are cacheable;
Differences:
1. Get is to get data from the server, and post is to send data to the server
2. get adds the parameter data queue to the URL specified by the Action attribute of the submission form. The values correspond to each field in the form one by one. In the URL, we can see that post is implemented through the http post mechanism, place the fields and content in the form in the HTML header and send them to the URL address referred to by the Action attribute. You cannot see this process;
3. The size of data transmitted by get is small and cannot exceed 2 kb. The size of data transmitted by post is large, which is not restricted by default. Theoretically, the maximum size of IIS4 is 80 KB, and that of iis5 is kb;
4. Low get security; high post security;
5. Get applies to multiple requests, while retaining post is only used to update sites;
6. If method is not specified during form submission, the default value is get. The data submitted in form will be appended to the URL? Separate from URL. The letter and number characters are sent as they are, but spaces are converted to "+". Other symbols are converted to % xx, XX indicates the ASCII (or ISO Latin-1) value in hexadecimal notation;
7. The data submitted by the GET request is placed in the HTTP Request Header, while the data submitted by the post is placed in the object data;
Apply"PostAndGet"Difference
In form, post or get can be used. They are all valid values of method. However, the post and gei methods are at least two different in their applicability;
1. The get method transmits user input through URL requests. The post method is in another form.
2. For get-based submission, request. querystring must be used to obtain the value of the variable. for post-based submission, request. form must be used to access the submitted content.
Difference between get and post in HTTP