Difference between GET and POST in ajax

Difference between GET and POST in ajax
You would use GET when the request is idempotent, meaning that multiple requests generate the same result. In general use GET to retrieve data from the server, in other words try to change the state on the server with a GET call. Use POST methods anytime you are changing the state on the server with a GET call. In POST you are required to set the content-Type header on the XMLHttpRequest.

No comments: