What are RESTful web services?

Possible Duplicate:
What exactly is RESTful programming?

What are RESTful web services? What would be an example of it?

What is the difference between the asmx web services and the WCF RESTful service?


您可以在这里查看Roy Fielding(REST架构风格的创建者)wiki页面,然后在这里转到他的博士论文,最后以快速示例的形式查看Twitter API。


REST is a client-server architecture which (among other things) leverages the full capacity of the HTTP protocol.

Some relevant points in REST:

  • Each URL on the server represents a resource; either a collection resource or an element resource.
  • A collection resource would be available at a URL like http://restful.ex/items/ which would be a representation of a list of items.
  • A element resource would be available at a URL like http://restful.ex/items/2 which would be a representation of a single item, identified by 2 .
  • Different HTTP methods are used for different CRUD operations:
  • a GET is a read operation
  • a PUT is a write/modify operation
  • a POST is a create/new operation
  • a DELETE is a... ok, that one is kind of self-explanatory.
  • State (or rather, client context) is not stored on the server-side; all state is in the representations passed back and forth by the client's requests and the server's responses.

  • 它基本上是使用HTTP方法实现CRUD的Web服务(GET,POST,PUT,DELETE)

    链接地址: http://www.djcxy.com/p/12320.html

    上一篇: Rest API究竟是什么

    下一篇: 什么是RESTful Web服务?