flatiron / restful

reflect RESTful Director routers from Resourceful resources
237 stars 48 forks source link

REST discrepancy between PUT and Resource.save() #2

Open mmalecki opened 12 years ago

mmalecki commented 12 years ago

Basically, basing on various REST resources (linked further down), we're not really doing it RESTfully.

PUT shouldn't be used for performing update operations (at least, not in the way resourceful does it - it merges updates with the existing document).

PUT to /creatures/someId should result in:

I believe we could also use PATCH HTTP method for performing partial updates, but it introduces some risks related to concurrency.

Resources:

Marak commented 12 years ago

Sounds right to me.

If you can make a branch with new test coverage that would cover any proposed changes, I can gladly make the core changes needed to implement your proposed API.