REST 介简 #3
Client
(Server)
Server
vps.mobroad.com/app
…
/orders/ { id }
POST / GET / PUT / DELETE
/customers/ { id }
POST / GET / PUT / DELETE
/customers/ { id } /orders
POST / GET / PUT / DELETE
Request: GET
http://.../customers/1/orders
Response:
Content-type: XML/JSON
http://.../orders/00131
http://.../orders/00832
http://.../orders/00759
以 品商店 例产 为
客 端 求列出户 请 id 为 1 的用 的所有户 订单
有框架支持现 (Framework)
NoFramework, No PUT / DELETE
PHP-based Framework
Zend
Ruby on Rails
11.
参考文献 & 相源关资
http://www.ics.uci.edu/~fielding/pubs/di
ssertation/rest_arch_style.htm
“RESTful Web Services”; Leonard
Richardson, Sam Ruby; (First Edition)
May 2007
http://www.wikipedia.org/