3 ms·
Not weird at all if people don't strictly follow a standard. The world of programming, just like the real world, has a lot of misguided doctrines that looked r
by nirui 1y ago
Not weird at all if people don't strictly follow a standard.
The world of programming, just like the real world, has a lot of misguided doctrines that looked really good on paper, but not on application.
For example:
"_links": {
....
"cancel": { "href": "/orders/123/cancel", "method": "POST" }
}
Why "POST"?
And what POST do you send? A bare POST with no data, or with parameters in it's body?
What if you also want to GET the status of cancellation? Change the type of `method` to an array so you can `"method": ["POST", "GET"]`?
What if you want to cancel the cancellation? Do you do `POST /orders/123/cancel/cancel HTTP/...`, or `DELETE /orders/123/cancel HTTP/...`?
So, people adopt, making an originally very pure and "based" standard into something they can actually use. After all, all of those things are meant to be productive, rather than ideological.
- octo888 1y agoHave a /cancellation resource. This could be returned by /cancel or it could just be linked to directly Now you have a noun and some of confusion goes away regarding GET and DELETE etc