Re:PUT or POST: The REST of the Story
by aGHz on Thursday January 26, 2012 @01:10PM
(#3515182)
Are you just HTTP-compliant (using the proper verbs and having Uniform Resource Locations point to actual resources) or are you truly 100% restful?
[ Parent
| on HN ]
I suppose looking back I do have a concept of a session which is state. So no, but I organized my verbs and URL's to meet the specification and have the option to remove those sessions.
But I guess since I'm using a cookie-based sessions its less of an issue for state changes since the state stays mostly on the client.
Re:PUT or POST: The REST of the Story
by mikaelgramont on Thursday January 26, 2012 @03:49PM
(#3515924)
Agreed. Sessions and the limitations of forms are the biggest obstacles to 100% restful APIs used from web browsers.
You can however use XHR form submission[1] in the background (which is a good practice (better site responsiveness) after all) to use HTTP methods other than GET and POST.
[1] e.g. http://jquery.malsup.com/form/#json