What is the difference between those two AJAX calls and why would I choose to use either when using the asp.net mvc framework?
One uses POST and one uses GET.
As far as what they're meant for - the only real technical difference (please correct this post if I'm wrong) is that GET has a much shorter limit to the query string. In practice, GET is meant for when fetching something from the server. A GET call should not cause side effects on the server. POST is when you intend to send something on the server and have it do something with it.
edit: the word I was looking for, to describe GET, is idempotent. You should be able to make the exact same GET call an unlimited number of times, and get the same result every time, with no consequence to the server (provided of course that no one else has changed the server's state.) But remember that there are no technical barriers preventing you from misusing either GET or POST.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With