2 ms·
This authors definition of HATEOAS as being “humans read some text” is bizarre and completely disconnected from what people were talking about at the time. Her
by mercutio2 3y ago
This authors definition of HATEOAS as being “humans read some text” is bizarre and completely disconnected from what people were talking about at the time.
Here’s how HATEOAS is supposed to be helpful for computers:
1. Out of band, humans create complex, useful, well defined media types that cover the space of the functionality they’re trying to define. These need to be well documented. This is where the whole thing falls down
2. Once you’ve got useful media types, you build servers that offer clients a “service document”, a collection of interesting resources (with resources potentially exposed with different media type representations, so newer better media types can be chosen when they’re created in the future, without needing to swap out your server)
3. Servers also define a variety of useful verbs they support, which can also expand over time
REST depends heavily on (1). Since almost no one bothers to do (1), the whole project gets tarnished by people trying to do the later stuff and calling it REST.