什么是基于发现的REST API?
从我所了解的参考资料https://en.wikipedia.org/wiki/HATEOAS来看,基于发现的REST API总是在响应中给出下一个可能的操作或多个操作的链接。
正如文章中所示,以下示例是对HTTP GET请求的响应。我可以看到下面的代码附有几个不同的选项,例如存款、取款、转账和关闭。
<?xml version="1.0"?>
<account>
<account_number>12345</account_number>
<balance currency="usd">100.00</balance>
<link rel="deposit" href="http://somebank.org/account/12345/deposit" />
<link rel="withdraw" href="http://somebank.org/account/12345/withdraw" />
<link rel="transfer" href="http://somebank.org/account/12345/transfer" />
<link rel="close" href="http://somebank.org/account/12345/close" />
</account>
那么基于发现的REST API真的只是关于响应“ALSO”提供系统中不同的可能性(当然,只提到逻辑上正确的顺序)吗?