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

should POST /key be PUT? #4

Open
cyphar opened this issue Dec 10, 2019 · 1 comment
Open

should POST /key be PUT? #4

cyphar opened this issue Dec 10, 2019 · 1 comment

Comments

@cyphar
Copy link
Member

cyphar commented Dec 10, 2019

Arguably, POST /key is not an entirely correct use of POST -- since the insertion operation (after #1 gets fixed) is idempotent arguably it should be PUT. However, I'm not sure whether this will confuse students (then again, they'll have to deal with PUT when they move on to "real-world" APIs anyway).

@kennib
Copy link
Collaborator

kennib commented Dec 10, 2019

PUT is definitely valid. POST is also valid but way less specific about the nature of the API. I think we could easily have both methods as long as there was a short explanation in the docs.

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