Hacker News new | ask | show | jobs
by krisknez 1 day ago
GET /api/add-a-comment?message=disagree
2 comments

'(to) comment' is already a verb.
GET, COMMENT, PUT, UPDATE, DELETE. Yeah, makes sense. Now we only need an alternative for PUT to backcronym CRUD. RIPOSTE?
I was referring to that the PATH could just be named /api/comment?... , because comment is already a verb.
URIs/paths are meant to point at resources/documents and therefore ideally should not contain verbs.
The word comment can be both a verb and a noun though. Are we pedantic enough yet? (:
This is exactly the kind of pointless discussion around rest apis
You’re using GET to Post a comment. Feels like another method is more appropriate.

Update: It clicked now…

GET /it?now