3 ms·
/addcomment v.s. /comment is all about the relationship to the parent. /addcomment IMHO should be a PUT since you're telling me your updating the parent, wherea
by rapind 18y ago
/addcomment v.s. /comment is all about the relationship to the parent. /addcomment IMHO should be a PUT since you're telling me your updating the parent, whereas /comments makes sense as a POST.
Just my two cents, but I'm not a fan of a POST with /add. POST already says create. PUT says update. /add is wasteful and confusing when you already grok HTTP verbs.
If you don't really think in terms of HTTP verbs though, then /add reduces confusion. The more uptake REST gets, the more natural it'll seem.