如何在.net中使用restful webservice [英] How to consume restful webservice in .net

查看:453
本文介绍了如何在.net中使用restful webservice的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要使用一个安静的网络服务,我必须传递用户名和密码以及api密钥。通过给定网址我们如何获取数据

I want to consume a restful webservice where i have to pass username and password and api key.through given url how can we get data

推荐答案

你想要吗?从服务器(或)获取用户名和密码要将用户名和密码发送到服务器?如果你想从服务器获取数据使用Http操作GET,如果你需要将数据发送到服务器使用POST



这里有一些你可能会觉得有用的链接



Do you want to get the user Name and Password from Server (or) you want to send the user Name and password to the server? If you want to get data from Server use Http operation GET and if you need to send data to server use POST

Here are few links which you might find useful

http://www.codeproject.com/Tips/765853/Retrieve-Data-From-WCF-Webservice-using-WCF-REST

http://jonathanvanderoost.com/2014/02/08/create-restful-wcf-service-api-with-json-receive-generic-json/


请阅读以下链接。



http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from -a-net-client [ ^ ]



在C#Restful Clie中创建C#Restful服务和消费nt,ASP.net客户端 [ ^ ]
Please read below links also.

http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client[^]

Create C# Restful Service and Consume in C# Restful Client, ASP.net Client[^]


这篇关于如何在.net中使用restful webservice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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