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

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
主站蜘蛛池模板: 绵阳市| 营山县| 宜春市| 乌什县| 阳江市| 望奎县| 平阴县| 高尔夫| 永修县| 邻水| 罗城| 洪江市| 定安县| 毕节市| 吉林市| 高密市| 拉萨市| 桃园县| 黑龙江省| 长宁区| 防城港市| 长顺县| 宁河县| 伊金霍洛旗| 应城市| 禹城市| 武城县| 辽阳县| 从化市| 湖北省| 仪征市| 五原县| 禄丰县| 卢氏县| 交口县| 特克斯县| 南溪县| 江西省| 萨迦县| 周宁县| 酒泉市|