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

Support 409 conflict for post requests #107

Closed
ordnungswidrig opened this Issue Mar 7, 2014 · 8 comments

Comments

Projects
None yet
7 participants
@ordnungswidrig
Member

ordnungswidrig commented Mar 7, 2014

While RFC2626 suggests only PUT requests to return 409, this can also be useful for POST requests.

See https://groups.google.com/forum/#!topic/clojure-liberator/RmR1RzIxBh0

@ordnungswidrig ordnungswidrig added this to the 1.0 milestone Mar 7, 2014

@aperiodic

This comment has been minimized.

Show comment
Hide comment
@aperiodic

aperiodic Mar 10, 2014

+1. We use POSTs to update resources, but sometimes the edits don't make sense, so it would be useful to return a 409 after executing post!.

aperiodic commented Mar 10, 2014

+1. We use POSTs to update resources, but sometimes the edits don't make sense, so it would be useful to return a 409 after executing post!.

@ordnungswidrig

This comment has been minimized.

Show comment
Hide comment
@ordnungswidrig

ordnungswidrig Mar 11, 2014

Member

If the edits don't make sense, then 422 unprocessable entity might be a better choice.

Member

ordnungswidrig commented Mar 11, 2014

If the edits don't make sense, then 422 unprocessable entity might be a better choice.

@rlinehan

This comment has been minimized.

Show comment
Hide comment
@rlinehan

rlinehan Mar 11, 2014

+1. I've got basically the exact same problem as in this post: https://groups.google.com/forum/#!msg/clojure-liberator/iaxFQPMZqJs/bMETIFMLHwwJ - the email address in our user table must be unique, and a 409 should be returned for a POST to create a user with an email address that already exists in the table.

rlinehan commented Mar 11, 2014

+1. I've got basically the exact same problem as in this post: https://groups.google.com/forum/#!msg/clojure-liberator/iaxFQPMZqJs/bMETIFMLHwwJ - the email address in our user table must be unique, and a 409 should be returned for a POST to create a user with an email address that already exists in the table.

@ttasterisco

This comment has been minimized.

Show comment
Hide comment
@ttasterisco

ttasterisco May 9, 2014

+1, similar use case as @rlinehan's

ttasterisco commented May 9, 2014

+1, similar use case as @rlinehan's

@vitillo

This comment has been minimized.

Show comment
Hide comment
@vitillo

vitillo Aug 30, 2014

+1, similar use case as @rlinehan's

vitillo commented Aug 30, 2014

+1, similar use case as @rlinehan's

@conan

This comment has been minimized.

Show comment
Hide comment
@conan

conan Sep 4, 2014

+1, also similar to @rlinehan's

conan commented Sep 4, 2014

+1, also similar to @rlinehan's

@sethkrasnianski

This comment has been minimized.

Show comment
Hide comment
@sethkrasnianski

sethkrasnianski May 20, 2015

Contributor

+1

Contributor

sethkrasnianski commented May 20, 2015

+1

@ordnungswidrig

This comment has been minimized.

Show comment
Hide comment
@ordnungswidrig

ordnungswidrig May 21, 2015

Member

I'm open for a PR. I suggest to support conflict for POST to move the decision "conflict?" be before "post-to-existing?" (see the graph for reference: http://clojure-liberator.github.io/liberator/assets/img/decision-graph.svg). After that change conflict? will be called for POST and PUT requests.

Member

ordnungswidrig commented May 21, 2015

I'm open for a PR. I suggest to support conflict for POST to move the decision "conflict?" be before "post-to-existing?" (see the graph for reference: http://clojure-liberator.github.io/liberator/assets/img/decision-graph.svg). After that change conflict? will be called for POST and PUT requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment