Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If reaction counts are write-only, the server should respond with a 403 or a 404.

Wouldn't HTTP 204 be more appropriate here? A 4xx would make it seem like the request failed, when in fact it succeeded.



403/404 seems to be the response to GET, not POST. In which case 405 Method Not Allowed would be better.


And 405 response must include `Allow: POST` header.


Oh, I misread. Indeed, 4xx makes sense for a GET.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: