简体   繁体   English

WCF请求/答复与Web API请求/响应

[英]WCF request/reply vs Web API request/response

For me request/reply or request/response it's the same. 对我而言,请求/答复或请求/响应是相同的。 https://en.wikipedia.org/wiki/Request%E2%80%93response https://zh.wikipedia.org/wiki/Request%E2%80%93响应

Then why when we are referring to the WCF we are saying WCF supports request/reply and when we are referring to the Web API we are saying Web API supports request/response. 那么为什么当我们指代WCF时,我们说WCF支持请求/响应,而当我们指代Web API时,我们却说Web API支持请求/响应。

The way i see the flow is: 我看到流程的方式是:

  • Step 1, request to the server 步骤1,向服务器请求

  • Step 2, the server responds/reply. 步骤2,服务器响应/回复。

It really is a difference or it's just a naming issue? 真的有区别还是只是命名问题?

Thank you. 谢谢。

I think it is mainly because of WCF using different terminology, while HTTP sticks to it's own request/response, but it is the same, check this wiki article . 我认为这主要是因为WCF使用了不同的术语,而HTTP坚持使用它自己的请求/响应,但是相同,请查看此Wiki文章 Both of them can act the same way with blocking request to get the response. 两者都可以以相同的方式阻止请求以获取响应。

I suppose it's only a naming conventions, maybe because WCF can use any protocol (http, https, tcp, net tcp, msmq, and so on). 我想这只是一个命名约定,也许是因为WCF可以使用任何协议(http,https,tcp,net tcp,msmq等)。 Web Api instead works only using http. 相反,Web Api仅适用于使用http。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM