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

Resource-based

One of the key things when a resource is being modeled is the URI definition. The URI is what defines a resource as unique. This representation is what will be returned for clients. If you decided to perform GET to the offer URI, the resource that returns should be a resource representing an order containing the ID order, creation date, and so on. The representation should be in JSON or XML.

Here is a JSON example:

{
id : 1234,
creation-date : "1937-01-01T12:00:27.87+00:20",
any-other-json-fields...
}

Here is an XML example:

<order>
<id>1234</id>
<creation-date>1937-01-01T12:00:27.87+00:20</creation-date>
any-other-xml-fields
</order>
主站蜘蛛池模板: 高密市| 平果县| 张家川| 黄冈市| 中方县| 嘉鱼县| 高邑县| 博客| 永仁县| 宁明县| 嘉禾县| 兴安盟| 南昌县| 吉木萨尔县| 新巴尔虎右旗| 松溪县| 罗城| 郧西县| 曲靖市| 石门县| 清河县| 肃宁县| 延津县| 绥江县| 海晏县| 郑州市| 泰和县| 特克斯县| 昌平区| 孟州市| 蒙阴县| 兴业县| 兴文县| 中宁县| 桃江县| 无为县| 陈巴尔虎旗| 孝昌县| 庐江县| 屯门区| 凤山县|