3 ms·
Much as a web crawler crawls HTML, an HTTP crawler should be able to crawl an HTTP API. There are operational benefits here of being able to write monitoring an
by zachrose 14y ago
Much as a web crawler crawls HTML, an HTTP crawler should be able to crawl an HTTP API. There are operational benefits here of being able to write monitoring and instrumentation tools that don't need to be updated and redeployed when your URLs change.
If this goes for a crawler, it's not so hard to see how it might be the same for an admin panel or CMS.
Sometimes when writing front-end JS apps, I'll develop a common abstract class for a family of resources, and the only unique information in each concrete subclass is it's URL structure!
Sometimes your data really is that boring, and you could develop an entire UI with different resource types without ever having to encode expectations in client-side code.