Hacker News new | ask | show | jobs
by icebraining 2899 days ago
POST is used for way, way, way more than any CRUD operation.
1 comments

Indeed it is, but at that point it's not "REST".
Why wouldn't it be?
The HTTP verb isn't reflecting what's happening, and likely some important considerations aren't being represented as entities.
The description of the POST method is very generic; one of its functions detailed in the HTTP spec is:

      - Providing a block of data, such as the result of submitting a
        form, to a data-handling process;
Which fits with much more than mere CRUD. And it's specifically written that it doesn't have to result in the creation of a new URI-addressable resource.

(Also, REST isn't HTTP, you can comply with the former even if you're violating the latter, and vice-versa)

> Also, REST isn't HTTP, you can comply with the former even if you're violating the latter, and vice-versa

Exactly. Complex processing via POSTs instead of distinct URI-addressable resources is HTTP-compliant but not REST-compliant.

I just don't see how it violates any of the REST constraints.