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

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>
主站蜘蛛池模板: 綦江县| 康定县| 南岸区| 区。| 若尔盖县| 无棣县| 上栗县| 玉门市| 邻水| 肥东县| 永寿县| 苍山县| 天津市| 深泽县| 信阳市| 安平县| 惠来县| 南通市| 日喀则市| 延吉市| 公安县| 从江县| 射洪县| 五大连池市| 宁强县| 杭州市| 泗阳县| 塔河县| 阜阳市| 兰考县| 江油市| 永登县| 湘乡市| 河源市| 丰都县| 高安市| 邵武市| 六枝特区| 英超| 广宗县| 叶城县|