官术网_书友最值得收藏!

HATEOAS

HATEOAS is a way that the client can interact with the response by navigating within it through the hierarchy in order to get complementary information.

For example, here the client makes a GET call to the order URI :

GET https://<HOST>/orders/1234

The response comes with a navigation link to the items within the 1234 order, as in the following code block:

{
id : 1234,
any-other-json-fields...,
links": [
{
"href": "1234/items",
"rel": "items",
"type" : "GET"
}
]
}

What happens here is that the link fields allow the client to navigate until 1234/items in order to see all the items that belong to the 1234 order.

主站蜘蛛池模板: 宝丰县| 卢氏县| 宁南县| 舒城县| 潞西市| 禄丰县| 安康市| 武鸣县| 连州市| 建德市| 临桂县| 商都县| 永宁县| 广宁县| 淳安县| 原平市| 大理市| 凤台县| 宣武区| 马龙县| 封开县| 正安县| 广丰县| 玉龙| 万载县| 璧山县| 平安县| 十堰市| 天祝| 涟水县| 内江市| 彝良县| 淳安县| 嵊州市| 禹州市| 沙坪坝区| 昂仁县| 天门市| 武义县| 五原县| 贺州市|