3 ms·
> linked JSON documents Isn't that REST? A REST API must not define fixed resource names or hierarchies (an obvious coupling of client and server). Servers mu
by tantalor 6y ago
> linked JSON documents
Isn't that REST?
A REST API must not define fixed resource names or hierarchies (an obvious coupling of client and server). Servers must have the freedom to control their own namespace. Instead, allow servers to instruct clients on how to construct appropriate URIs, such as is done in HTML forms and URI templates, by defining those instructions within media types and link relations.
https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypert...
The article mentions rate limiting by connections:
> limit users to 60 connections per minute
You can make multiple requests over a single connection.
- sramsay 6y ago> allow servers to instruct clients on how to construct appropriate URIs Right. That would be great, and actually, that's what the commercial services do. With NWS it goes something like this: Say the user has a lat/long. You fire off an http request for a document that tells you what "quadrant" you are in and the URL for it. You then fire off a request for the quadrant document, that lists the products that are available (and their associated URLs). You then fire another request for the actual product for that quadrant . . . This is not a real example, but this is basically how it works. Even when you can construct a single URL with the info you need, you still need to make multiple requests to have enough information to build the URL (if that makes sense). > You can make multiple requests over a single connection. You mean with some kind of http keep-alive thing? I'm not sure I can do that in these circumstance (with cURL). (edits for grammar, minor issues of clarity)