3 ms·
The way I think of it is that GET, PUT, PATCH and DELETE all deal with data, whereas POST is a call to action. It is a little unfortunate that we don't have a
by billpg 8y ago
The way I think of it is that GET, PUT, PATCH and DELETE all deal with data, whereas POST is a call to action.
It is a little unfortunate that we don't have a CREATE verb (distinct from the update-ness of PUT) and we need to use POST for this purpose.
- 0x445442 8y agoThat's interesting. Are you saying that you view Posts as verbs/processes which only result in side effects of the underlying system but do not change the state of data? I'm trying to understand what you would consider the domain of actions that would fall under your Post categorization. Batch Jobs, Emailing reports etc.?
- billpg 8y agoThat's basically right. I view GET/PUT/PATCH/DELETE/CREATE as simple wrappers around SQL commands, with validation and authorization checks. POST is a call to do something with that data, which might include changing the data. Off the top of my head, logging in, actions with external systems, sending emails.
- ams6110 8y agoI've had to support http clients that could only do GET and POST. So I tend to do everything by those two verbs, even though it's not academically correct.