RPC and REST Calls Comparison PDF
Document Details
Uploaded by DecisiveGreatWallOfChina1467
Tags
Summary
This document compares RPC and REST calls, outlining the different operations involved in each methodology. It provides examples of the API calls used for various actions like signup, resign, and adding/updating items. The document focuses solely on API calls rather than specific use cases of RPC or REST calls.
Full Transcript
✂ RPC and REST calls comparison Operation RPC REST Signup ** POST /signup ** ** POST /persons** Resign ** POST /resign ** ** DELE...
✂ RPC and REST calls comparison Operation RPC REST Signup ** POST /signup ** ** POST /persons** Resign ** POST /resign ** ** DELETE /persons/ ** { 1234 "personid": "1234" } Read a person ** GET /readPerson? ** ** GET /persons/1234 ** personid=1234 Read a person’s items ** GET / ** ** GET /persons/1234/ ** list readUsersItemsList? items personid=1234 Add an item to a ** POST / ** ** POST /persons/1234/ ** person’s items addItemToUsersItemsLi items st { { "itemid": "456" "personid": "1234"; } "itemid": "456" } Update an item ** POST /modifyItem ** ** PUT /items/456 ** { { "itemid": "456"; "key": "value" "key": "value" } } Delete an item ** POST /removeItem ** ** DELETE /items/456 ** { "itemid": "456" } *[ Source: Do you really know why you prefer REST over RPC ]()*