In HTTP requests, both of these techniques are utilized. In general, GET is used to download data while PUT is used to upload data. However, we may use GET/POST to do both downloading and uploading.
GET:
- If we are sending parameters in a GET request to the server, then those parameters will be visible in the URL because, in GET, parameters are appended to the URL. So there’s a lack of security while uploading to the server.
- We can only send a limited amount of data in a GET request because the URL has its max limit and we can not append a long data string to the URL.
POST:
- If we are using POST then we are sending parameters in the body section of a request. If we send data after using encryption in the body of an HTTP request, it’s quite a bit more secure.
- We can send a lot more data using POST.