API Design · Junior · Question 51 of 75
What's the difference between REST and RPC style APIs?
- 1REST always uses XML
- ✓Correct answer: REST models resources with standard methods; RPC exposes operations (
createInvoice,sendEmail) called like functions - 3RPC can't use HTTP
Explanation
Both are valid. Many REST APIs include a few action endpoints (e.g. POST /orders/42:cancel in Google's style) for operations that don't map to CRUD.