Hacker News new | ask | show | jobs
by garnet7 6024 days ago
What's the difference between "JSON in GET/POST" and "REST with JSON"?
2 comments

In 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.

Ah thanks. Just plain JSON RPC sounds simplest to me.
"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.