4 ms·
REST is based around resources and kind of the polar opposite of RPC when it comes to writing APIs.
by efdee 4y ago
REST is based around resources and kind of the polar opposite of RPC when it comes to writing APIs.
- whalesalad 4y agoREST is literally RPC. You are making a remote procedure call to a URL. GET this resource. DELETE this resource. It's the same thing. What is the difference between remote.perform('some-action', { payload }) and remote.POST('some-action', payload) ?
- efdee 4y agoThere is no difference: neither of those are REST. Calling an URL with an action in the path name (rather than a resource name) is technically not done in REST -- the action is expressed through your HTTP verb. Using GET/POST/DELETE directly does not mean you're doing REST - there's a whole set of rules and assumptions that come with it.
- pbreit 4y agoIs it though? Or is the difference mostly semantics? At then end of the day it's just barely different ways for issuing a "command".