REST principles dictate that when a resource is created or updated (POST/PUT), the response body should contain a representation of the transaction result, along with a location header of the new resource, etc. While this is all good and well, it pretty much forces you to re-request the resource to get its current state, but HTTP requests are not free - far from it. Is there an accepted approach to deal with this?
It would seem appropriate to return both a location header and an XML or JSON structure in the body to avoid a wasteful second AJAX request. The body can then use an envelope/namespace similar to SOAP that would separate any transaction response message from the resource representation itself.
originally asked here: http://stackoverflow.com/questions/11123571/proper-way-to-minimize-rest-re-requests-on-create-update
thanks!