carbon-io / carbond

MIT License
2 stars 5 forks source link

save status code should be 201? #300

Closed tfogo closed 6 years ago

tfogo commented 6 years ago

Shouldn't PUT /collection return a 201 if it creates resources? Currently it returns a 200.

gregbanks commented 6 years ago

technically, PUT /collection is replacing the collection, hence the 200. PUT /collection/:id, on the other hand, will return 201 if it results in a new document.

tfogo commented 6 years ago

Ah I see - 201 is for single resources