GET: request and obtain a resource server
POST: request and obtain a server resources, while some of the data sent to the server
GET method is a safe method, POST method is unsafe methods. GET request does not modify resources on the server, POST requests may modify resources on the server.
Difference between the two ( here quoted from: https://www.cnblogs.com/igeneral/p/3641574.html )
GET | POST | |
Click Back / Refresh button | No effect | Data will be re-sent (the browser will prompt the user to "be re-submitted data") |
Add bookmark | can | Can not |
Cache | can | Can not |
Type of encoding (Encoding type) | application/x-www-form-urlencoded | application / x-www-form-urlencoded or multipart / form-data. Please use multipart encoded into binary data |
history record | Have | No |
Length limit | Have | No |
Data type restrictions | Allow only ASCII characters type | no limit. It allows binary data |
safety | The query string is displayed in the URL address bar, insecure, do not use GET request to submit sensitive data | Because the data is not displayed in the address bar, it will not cached or saved in your browsing history, so look POST than GET request plead safe, but not the most secure way. The need to transmit sensitive data, using the encryption transmission |
Visibility | The query string is displayed in the URL address bar, visible | The query string is not displayed in the address bar is not visible |
Reproduced in: https: //my.oschina.net/worriedfox/blog/1837494