Hacker News new | ask | show | jobs
by lmm 2899 days ago
The useful/valuable part of what came to be called "REST" (very little of which is found in the dissertation, it's an accident of terminology which has lead a lot of people astray) is all about CRUD, because CRUD is the only thing that makes sense to do with a generic "resource".
1 comments

POST is used for way, way, way more than any CRUD operation.
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.