RESTful Web 服务和 HTTP 动词 [英] RESTful web services and HTTP verbs

查看:66
本文介绍了RESTful Web 服务和 HTTP 动词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

服务器应允许将 Web 服务归类为 RESTful 的最小 HTTP 动词集是多少?

如果我的托管商不允许 PUTDELETE 怎么办?

这真的很重要吗,我可以通过 GETPOST 过上幸福的生活吗?><小时>

更新:感谢大家的回答,Roger 的回答 可能是最好的,因为链接到了 Bill Venners 和 Elliotte Rusty Harold 的采访.我现在明白了.

<小时>

解决方案

是的,你可以不用 PUT 和 DELETE.

这篇文章告诉你原因:http://www.artima.com/lejava/articles/why_put_and_delete.html

虽然对于真正的 RESTafrians 来说,这可能是异端邪说,但在现实世界中,您可以尽自己所能,用您所拥有的.尽可能理性,尽可能与自己的约定保持一致,但你绝对可以构建一个没有 P 和 D 的好的 RESTful 系统.

rp

What is the minimum set of HTTP verbs that a server should allow for a web service to be classed as RESTful?

What if my hoster doesn't permit PUT and DELETE?

Is this actually important, can I live happily ever after with just GET and POST ?


Update: Thanks for the answers folks, Roger's answer was probably best because of the link to the Bill Venners and Elliotte Rusty Harold interview. I now get it.


解决方案

Yes, you can live without PUT and DELETE.

This article tells you why: http://www.artima.com/lejava/articles/why_put_and_delete.html

While to true RESTafrians this may be heresy, in the real world you do what you can, with what you have. Be as rational as you can and as consistent with your own convention as you can, but you can definitely build a good RESTful system without P and D.

rp

这篇关于RESTful Web 服务和 HTTP 动词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆