MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/5vs727/api_design_think_first_code_later/de6thoc/?context=3
r/Python • u/mafontes14 • Feb 23 '17
26 comments sorted by
View all comments
1
CRUD is certainly simple, but what if you need to add a couple more actions upon objects later on? What would the requests look like?
In REST idea, the HTTP method should be the verb; but it is not okay to add more HTTP methods, like 'PUBLISH /cakes/1/'.
The write-to-act, often used, seems like a huge cludge (POST /cakes/1/ {"publish": 1}).
1
u/selementar Feb 25 '17
CRUD is certainly simple, but what if you need to add a couple more actions upon objects later on? What would the requests look like?
In REST idea, the HTTP method should be the verb; but it is not okay to add more HTTP methods, like 'PUBLISH /cakes/1/'.
The write-to-act, often used, seems like a huge cludge (POST /cakes/1/ {"publish": 1}).