This is an excellent summary of REST, why SOAP services should be considered broken and why your services should be RESTful. One overlooked benefit of REST: interacting with the HTTP ecosystem correctly. You might not be using a caching proxy on the server-side but if your clients want to use a caching proxy, making your service RESTful means it will behave correctly in unexpected, but legitimate, network architectures.
One fact I did not know: PUT is idempotent, POST is not.

2 responses so far ↓
1 Adam Keys // Aug 17, 2008 at 5:41 pm
Not having read the discussion, I believe the HTTP spec states that GET is the only idempotent verb. It may be the case, however, that two PUT requests with the same parameters return the response every time.
2 mperham // Aug 17, 2008 at 6:35 pm
Adam, from here:
http://www.sitepen.com/blog/2008/03/25/rest-and-rpc-relationship/
The PUT method is intended to send the content to be used as replacement for the resource associated with the supplied URI. This method provides a means for a client to alter data from a resource and send a request for the alteration of the resource such that it is not necessary for the client to re-retrieve the resource afterwards to determine the effect. In a generic RPC, a client sends a message to a server, but generally must examine the response of the request, or request any resources that may have been altered, in order to determine the effects of the request. With a PUT, there is an agreement that the client knows the effect of the request, and may continue with its internal knowledge of the resource change unless an error response is received indicating otherwise. A PUT verb is also idempotent.
Leave a Comment