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

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.

主站蜘蛛池模板: 麻城市| 武宁县| 阿城市| 岐山县| 上虞市| 临邑县| 延津县| 辰溪县| 荔波县| 灵山县| 梧州市| 丹棱县| 康定县| 屏山县| 灵山县| 岳阳市| 渝中区| 梁平县| 枣强县| 苏尼特右旗| 施秉县| 五华县| 滁州市| 陵水| 新竹县| 淳化县| 清丰县| 三江| 泸西县| 潜山县| 姚安县| 新余市| 达日县| 星座| 龙川县| 游戏| 凤山县| 西乌珠穆沁旗| 兴海县| 栖霞市| 洛浦县|