2 ms·
Well, yes? He wasn't writing about how to build web APIs. He makes no mention of HTTP verbs, and nothing about REST requires such verbs to even exist in the un
by Lazare 6y ago
Well, yes?
He wasn't writing about how to build web APIs. He makes no mention of HTTP verbs, and nothing about REST requires such verbs to even exist in the underlying protocol. He was discussing, at a high level, how you might design a protocol like HTTP/1.1, not how to build an API on HTTP/1.1.
Further, the single key feature of a REST API is hypermedia, aka, links. If you do want to use HTTP for your REST API, GET and maybe POST are 100% of what you need, because that's what you use to follow hyperlinks.
To quote Fielding:
> A REST API should be entered with no prior knowledge beyond the initial URI... From that point on, all application state transitions must be driven by client selection of server-provided choice...
Not mentioned: What HTTP verb you need to use to trigger the state transition, because it doesn't matter. And in fact, to the extent that a client has to "know" which verb to use, that actually goes against REST principles.
> So if the true representation of representational state is a simple website like this, then large parts of that "spec" were irrelevant to 99.9% of sites before "web services".
Again, there's no spec, unless you mean HTTP/1.1. And to the extent that we're talking about the principles that underpin the entire HTTP protocol, arguably they're relevant to 100% of sites. :)