6 ms·
What's the difference between "JSON in GET/POST" and "REST with JSON"?
by garnet7 17y ago
What's the difference between "JSON in GET/POST" and "REST with JSON"?
- carey 17y ago"REST with JSON" should send the (relative) URL for the next request, not just an ID. Although there's more to it than just that.
- JulianMorrison 17y agoIn one, you are essentially doing RPC: here's the input, do the operation and give me an output. In the other, you are remotely manipulating "documents". Even a command to act consists of emplacing a "request" and being redirected to a "response". You navigate between "documents" by following URLs in links. To be honest, I like REST for CRUD of things that are natural resources, but I think it's wasted extra work for operations that are natural RPCs.
- garnet7 17y agoAh thanks. Just plain JSON RPC sounds simplest to me.