Why you won't need HATEOAS?

In practice, usually, you probably won't need HATEOAS. Here are the reasons:

  • First of all, implementing and maintaining HATEOAS requires effort on both the server-side and the client-side. The server-side needs to construct the hypertext based on the state of the resource and the clients need to parse the hypertext and understand the meaning of the hypertext to perform the correct operation. Compared with the API without HATEOAS, what you need to do on the client-side is hard-code the URIs of the resources and decide what operations are available based on the representation of the resource. For example, in our ordering coffee example, you can find out which operations among make a payment, update the order, and ...

Get Building Applications with Spring 5 and Vue.js 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.