HttpRequest对Web服务代理 [英] HttpRequest Vs Web Service proxy

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

问题描述

哪种消费网络服务最好?使用HttpRequest或创建Web服务代理?

Which is best way to consume web service? Using HttpRequest or creating web service proxy ?

谢谢。

 

推荐答案

与往常一样,"什么是最好的"的答案是"它取决于"。

As always, the answer to "what's the best", is "it depends".

然而,使用"几乎总是更好" ;添加服务参考"创建一组代理类,然后使用它们。只要有可能,让别人为你做这项工作几乎总是更好。在这种情况下,如果你决定使用HttpRequest,代理类
已经完成了你需要做的工作。

However, it will almost always be better to use "Add Service Reference" to create a set of proxy classes and to then consume them. It's almost always better to let someone else do the work for you, whenever you can. In this case, the proxy classes have already done the work you would need to do if you decided to use HttpRequest.

 


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

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