12 February 2006


This is about Representational State Transfer not rest, verb.

Quote from ajaxpatterns:

" Witness the the debacle caused by the Google Accelerator interacting with non-RESTful services in mid-2005. The accelerator jumps ahead of the user and prefetches each link in case they should click on it (a non-Ajaxian example of Predictive Fetch). The problem came when users logged into non-RESTful applications like Backpack. Because Backpack deletes items using GET calls, the accelerator - in its eagerness to activate each GET query - ended up deleting personal data. This could happen with regular search engine crawlers too ... "

REST compared to RPC

1 comment:

k4ml said...

never put verb in the url since there's only a few verbs exist for HTTP with GET/POST is the widely used and implemented by the browser and supported by the application server. But with DELETE not implemented by browser, iirc, it's quite hard to make an application in RESTful manner. consider these:-

GET http://site.com/node/122 should present resource node with id 122.

POST http://site.com/node/122 should update resource node with id 122

DELETE http://site.com/node/122 should delete resource node with id 122.

while DELETE can be supported/implemented by application, there's no way to specify delete using browser, unless you use curl ;).