I have a web service that accepts JSON parameters and have specific URLs for methods, e.g.:
http://IP:PORT/API/getAllData?p={JSON}
This is definitely not REST as it is not stateless. It takes cookies into account and has its own session.
Is it RPC? What is the difference between RPC and REST?
RPC is action-oriented. In contrast, REST is resource-oriented. REST utilizes HTTP methods GET, POST, PUT, PATCH, and DELETE to perform CRUD operations. However, RPC only supports GET and POST requests.
REST is made out by many to be ultimately superior to the other “RPC-based” approaches, which is a bit misleading because they are just different. This article discusses these two approaches in the context of building HTTP APIs, because that is how they are most commonly used.
Web services are a type of API, which must be accessed through a network connection. REST APIs are a standardized architecture for building web APIs using HTTP methods.
Consider the following example of HTTP APIs that model orders being placed in a restaurant.
Placing an Order:
Retrieving an Order:
Updating an Order:
Example taken from sites.google.com/site/wagingguerillasoftware/rest-series/what-is-restful-rest-vs-rpc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With