In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
1 、 GET 、 POST
The two are the methods of HTTP request message, in addition to OPTION, HEAD, PUT, DELETE, TRACE, CONNECT.
GET: request to read the information marked by URL (uniform Resource Locator)
POST: add information to the server
1) according to the HTTP specification, GET is used for information acquisition and should be secure and idempotent.
(1) the so-called security means that the operation is used to obtain information rather than modify it. In other words, GET requests should generally have no side effects. That is to say, it only obtains the resource information, just like the database query, it will not modify, increase the data, and will not affect the state of the resource.
Idempotent means that multiple requests to the same URL should return the same result.
2) according to the HTTP specification, POST represents a request that may modify resources on a variable server
2. Differences and connections
1) the data requested by GET will be appended to the URL (that is, the data will be placed in the HTTP protocol header) to? Split the URL and transmit the data, and the parameters are connected by &.
POST places the submitted data in the body of the HTTP package.
2) "data submitted by GET can only be 1024 bytes at most", because GET submits data through URL, so the amount of data that can be submitted by GET is directly related to the length of URL. In fact, URL does not have the problem of upper limit of parameters, and HTTP protocol specification does not limit the length of URL. This restriction is limited by specific browsers and servers. IE limits the length of URL to 2083 bytes (2K+35). For other browsers, such as Netscape, FireFox, etc., there is theoretically no length limit, which depends on the support of the operating system.
Note that this is limited to the entire URL length, not just the data length of your parameter values.
In theory, there is no size limit for POST, and there is no size limit for the HTTP protocol specification, which is limited by the processing power of the server's processor.
3) the method of obtaining request parameters is different. For example, in ASP, the server uses Request.QueryString to obtain GET request parameters and Request.Form to obtain POST request parameters.
4) POST is more secure than GET. For example: submit data through GET, the user name and password will appear in clear text on URL, because (1) the login page may be cached by the browser, (2) others view the history of the browser, then others can get your account and password, in addition, submitting data using GET may also result in Cross-site request forgery***.
5) GET: the query string is displayed in the URL of the address bar, visible
POST: the query string is not displayed in the address bar and is not visible
6) data type restrictions:
GET: only ASCII character types are allowed
POST: there is no limit. Allow binary data
7) GET requests can be cached, GET requests will be saved in the browser's browsing record, and the URL requested by GET can be saved as browser bookmarks
POST:POST requests cannot be cached, POST requests will not be saved in browser browsing records, and URL requested by POST cannot be saved as browser bookmarks
8) Click the back / Refresh button:
GET: no impact
POST: the data will be resent (the browser will prompt the user that "the data has been resubmitted")
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.