While troubleshooting /posts/{id}/comments/add
in order to answer Why am I getting a 404 when trying to post a comment?, it was noticed that the API path in question only responded to POST requests. This is all well and good, especially given that adding a comment is neither idempotent nor safe, which GETs should be (HTTP spec says so). However, there is just one problem:
Nowhere in the documentation is it mentioned that you need to use POST to successfully write.
Knowledge of the HTTP spec (and super deductive skills) told me and commenter Brock Adams the correct remedy ("You need to POST
, not GET
."), but I really think this should be documented.