Web服务 – REST(RESTful)Web服务是否与HTTP绑定(耦合或需要)?

标题基本上都说明了,REST真的与HTTP绑定还是协议无关?
因为我刚读了几篇关于REST的文章,所以我遇到了两个意见,所以我不知道哪一个是正确的.

解决方法

请允许我引用 “RESTful Web Services”这本书(粗体是我的):

The Story of the REST

REST is simple,but it’s well defined and not an
excuse for implementing web services as half-assed web sites because
“they’re the same.” Unfortunately,until Now the main REST reference
was chapter five of Roy Fielding’s 2000 Ph.D. dissertation,which is a
good read for a Ph.D. dissertation,but leaves most of the real-world
questions unanswered. That’s because it presents REST not as an
architecture but as a way of judging architectures.
The term “RESTful”
is like the term “object-oriented.” A language,a framework,or an
application may be designed in an object-oriented way,but that
doesn’t make its architecture the object-oriented architecture. Even
in object-oriented languages like C++ and Ruby,it’s possible to write
programs that are not truly object-oriented. HTTP in the abstract does
very well on the criteria of REST.
(It ought to,since Fielding
co-wrote the HTTP standard and wrote his dissertation to describe the
architecture of the Web.) But real web sites,web applications,and
web services often betray the principles of REST. (…)

请注意,在第二个粗体中,他说:“HTTP非常适合REST”,而不是“REST适合/依赖于HTTP”.

因此,简而言之:不,术语“REST”不一定与HTTP相关联. RESTful Web服务只是遵循RESTful架构的Web服务,希望实现Fielding在其论文中列出的好处(例如无状态,可寻址性等).

创建RESTful Web服务的一种方法是根据资源(而不是SOAP样式使用的操作)来考虑应用程序.结合正确使用HTTP(其方法和状态代码)的这种思维方式可以导致支持REST的架构(并且具有所有好处)Fielding的论文枚举.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些