Re:Use GET for AJAX Requests (or not)
by bmelton on Friday April 06, 2012 @07:56AM
(#3806784)
It's not clear to me which action the documentation is referring to, or what specifically you're trying to accomplish.
The easy answer for me is that I use GET requests when I'm fetching data, POST to create new data, PATCH to update existing data and PUT to mass-update multiple records.
So, if you're speaking for a general purpose method, then I'd say you're probably going to use GET most of the time, unless your app is more write-heavy, then I'd recommend you use POST most of the time. Otherwise, I'd suggest using the appropriate method for the action given.
The easy answer for me is that I use GET requests when I'm fetching data, POST to create new data, PATCH to update existing data and PUT to mass-update multiple records.
So, if you're speaking for a general purpose method, then I'd say you're probably going to use GET most of the time, unless your app is more write-heavy, then I'd recommend you use POST most of the time. Otherwise, I'd suggest using the appropriate method for the action given.