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

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>
主站蜘蛛池模板: 亳州市| 双辽市| 兴和县| 嘉善县| 满洲里市| 北京市| 定日县| 石台县| 九寨沟县| 开封县| 丹江口市| 锦屏县| 东丽区| 淮安市| 临湘市| 武定县| 舟曲县| 徐汇区| 林州市| 紫金县| 竹溪县| 施秉县| 永州市| 饶平县| 永定县| 乌海市| 赣榆县| 霍林郭勒市| 鹰潭市| 瓦房店市| 介休市| 临泽县| 蓬莱市| 固阳县| 郴州市| 嫩江县| 乐山市| 响水县| 永昌县| 赣榆县| 乳源|