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

Why REST services

A REST-based service is best suited for limited bandwidth and resources where you need to process simple Create, Read, Update, Delete (CRUD) type operations using the following verbs:

  • GET
  • POST
  • PUT
  • DELETE

Also, REST is a platform and language independent service, which makes it ideal as an integration protocol.

It uses a lightweight protocol such as HTTP to send messages in a simple XML format, or other formats such as JSON or plain text. TCP may also be used, but HTTP is more commonly used.

REST services are totally stateless in operation. This allows greater scalability since the server does not have to maintain the session state. What this essentially means is that the client must include all the information required for the server to fulfill each request.

For a comparison between messaging based on SOAP and REST, please refer to the blog post at http://connectedcircuits.wordpress.com/2013/02/16/what-to-use-soap-or-rest/.

A RESTful API should adhere to the following specifications:

  • Honor HTTP request verbs
  • Use of proper HTTP status code
  • No version numbers in the URIs
  • Response message format defined in the HTTP Accept header
主站蜘蛛池模板: 庆云县| 拉萨市| 清苑县| 邯郸市| 长沙市| 黔东| 五家渠市| 尚志市| 中方县| 清涧县| 宕昌县| 太保市| 永嘉县| 哈尔滨市| 陵水| 江油市| 平遥县| 井研县| 朝阳县| 乌鲁木齐市| 荔波县| 怀仁县| 江口县| 阿巴嘎旗| 江达县| 永清县| 松滋市| 九台市| 新乡县| 韶关市| 天水市| 苏州市| 扎鲁特旗| 赣州市| 宕昌县| 台中市| 汉中市| 平顶山市| 吉隆县| 和龙市| 蒲城县|