I have a web application that uses AJAX to grab JSON data from the server. It requires that the user first log in with their browser so that a cookie can be set. Only the
REST is best described to work with the resources, where as RPC is more about the actions.
REST: stands for Representational State Transfer. It is a simple way to organize interactions between independent systems. RESTful applications use HTTP requests to post data (create and/or update), read data (e.g., make queries), and delete data. Thus, REST uses HTTP for all four CRUD (Create/Read/Update/Delete) operations.
RPC: RPC is basically used to communicate across the different modules to serve user requests. e.g. In openstack like how nova, glance and neutron work together when booting a virtual machine.
REST/RPC:
As a programming approach, REST is a lightweight alternative to Web Services and RPC. Much like Web Services, a REST service is: