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

HTTP responses #135

Open
amitrahav opened this issue Jan 10, 2022 · 1 comment
Open

HTTP responses #135

amitrahav opened this issue Jan 10, 2022 · 1 comment
Labels
question Further information is requested

Comments

@amitrahav
Copy link

By Mozilla docs, delete. and put responses should be 204 on success.

Is there a reason you choose to return 200?

@awtkns
Copy link
Owner

awtkns commented Jan 12, 2022

Hi @amitrahav, thanks for the question! Both routes are actually returning content, the delete route is returning the model that was deleted while the update route (put) is returning the updated model. As such, I feel that having a 200 response is reasonable as content is being returned.

A 202 (Accepted) status code if the action will likely succeed but has not yet been enacted.
A 204 (No Content) status code if the action has been enacted and no further information is to be supplied.
A 200 (OK) status code if the action has been enacted and the response message includes a representation describing the > status.

Do you still feel there is a change necessary?

@awtkns awtkns added the question Further information is requested label Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants