通过http标头进行webservice调用 [英] webservice call through http header
本文介绍了通过http标头进行webservice调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
请帮助我通过http标头调用rest应用程序,并且也需要传递请求标头.
请提出建议.
Hi All,
Please help me to call rest application through http header and also need to pass request header too.
Please suggest.
推荐答案
这是一个非常不错的教程: ^ ]
但是据我了解,您只需要使用RESTfull服务.实际上,有更多的写方法,因此消耗它们的信息也有所不同.这是一种更通用,更简单的方法: http://rest.elkstein. org/2008/02/using-rest-in-c-sharp.html [
This is a really good tutorial: Create and Consume RESTFul Service in .NET Framework 4.0[^]
But as I understood, you need only to consume RESTfull service. Actually there are more approaches to write one, thus consuming them migth also differ. This one is a more general and easy approach: http://rest.elkstein.org/2008/02/using-rest-in-c-sharp.html[^], but you need to code more. You can change the Method property to use DELETE or PUT (or other) http methods instead of POST.
请查看以下博客条目:
具有自定义http标头的WCF REST服务在.NET 4中进行检查 [^ ]
使用自定义http标头的WCF REST客户端-2 [ ^ ]
实践中的RESTful HTTP [
Have a look at following blog entries for it:
WCF REST service with custom http header check in .NET 4[^]
WCF REST client using custom http headers - 2[^]
RESTful HTTP in practice[^]
Try out!
这篇关于通过http标头进行webservice调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文