interagent / http-api-design

HTTP API design guide extracted from work on the Heroku Platform API
https://geemus.gitbooks.io/http-api-design/content/en/
Other
13.69k stars 1.07k forks source link

Recommend synchronous DELETE requests return 204 #41

Open keithamus opened 10 years ago

keithamus commented 10 years ago

I feel like we've reached enough of a consensus in #15 to attempt to PR a change, so this fixes #15.

Wording has been changed to suggest all responses should provide the latest copy of the data, further suggesting that (synchronous) DELETEs should return a 204 No Content.

rikvanmechelen commented 10 years ago

I was the original creator of #15 So i am totally for the change. I followed the discussion in #15 and agree with it as well. However, since this is a guide, it should leave both possibilities open, and include the reasoning of why one might want to chose a 204 above a 200 for a delete.

keithamus commented 10 years ago

I think by virtue of it being a guide, it has a huge caveat emptor label over everything anyway. My personal feeling about this is that it should be prescriptive (and it all pretty much is so far), because leaving stuff open to interpretation means varying qualities of implementation.

geemus commented 10 years ago

I would also prefer a single prescriptive option, wherever possible. I think the exceptional case would be synchronous vs asynchronous. That said, one of my colleagues is pulling on a few extra threads in #15 that I'd like to continue discussing a bit more before we decide which possibility we think is best.