Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mmalecki opened this issue May 19, 2012 · 1 comment
Open

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

mmalecki opened this issue May 19, 2012 · 1 comment

Comments

@mmalecki
Copy link

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:

  • creation of /creatures/someId if it doesn't exist, with data supplied in the request
  • full replacement of /creatures/someId if it exists

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

Resources:

@Marak
Copy link
Contributor

Marak commented Jul 24, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants