所有Web服务都是自动化的宁静Web服务吗? [英] Are all web services automagically restful web services?

查看:141
本文介绍了所有Web服务都是自动化的宁静Web服务吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有的Web服务都是通过HTTP而不是SOAP自动提供宁静的Web服务吗?

Are all web services through HTTP and not SOAP automagically restful web services?

我到处听到Restful web services一词......但不是它只是一个普通的使用http的Web服务。

I have been hearing the term "Restful web services" everywhere.. but ain't it simply a plain old "web service that uses http".

我在 A.php 有一个网址,客户请求我这样的数据: A.php?parameters_supplied_here_etc_etc

I have a url at A.php and clients request data from me like this: A.php?parameters_supplied_here_etc_etc

由于网址有长度限制,对于较长的消息,他们会发送一个带有参数的POST请求 A.php

And since the url has a length limit, for longer messages they will send a POST request with the parameters to A.php

基本上如果有人想和我的服务器/数据库通话,它会通过 A.php

Basically if anyone wants to talk to my server/database, it goes through the page at A.php

我可以说这是一个宁静的网络服务吗?

So can I say that it's a restful web service??

推荐答案

REST的基石之一架构风格使用HTTP充分发挥其潜力(GET,HEAD,PUT,POST,DELETE,内容类型,etags,缓存控制等)而不是隧道。如果你这样做,你已经赢得了很多,我认为你应该有权将你的服务称为REST Inspired或其他东西。从那里你可以使用所有现有的HTTP基础结构构建块,而不必对它们起作用。

One of the cornerstones of "REST" architectural style is using HTTP to its full potential (GET, HEAD, PUT, POST, DELETE, content-type, etags, cache control, etc) instead of as a tunnel. If you do just that, you already win a lot, and I think you should feel entitled to call your service "REST Inspired" or something. From there you can use all the existing building blocks of HTTP infrastructure to your advantage, instead of having to work against them.

通常很有可能想出你自己的RPC或通过HTTP的CRUD协议,并重新发明轮子。结果通常与REST原则完全相反。

It's often tempting to come up with your own RPC or CRUD protocol over HTTP, and reinvent the wheel. The result is usually quite contrary to REST principles.

这篇关于所有Web服务都是自动化的宁静Web服务吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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