如何从ASP.NET 2008应用程序调用rest API [英] How do I call rest API from ASP.NET 2008 application

查看:80
本文介绍了如何从ASP.NET 2008应用程序调用rest API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net 3.5中有一个应用程序需要使用MongoDB数据库从移动应用程序访问一些数据。我有其余的API网址。我如何访问这些api并从那里获取数据,以便我可以在我的应用程序中使用它们使用MS SQL服务器作为后端?



我是什么尝试过:



我不知道这个,所以请我帮忙

I have an application in asp.net 3.5 which needs to access some data from a mobile app using MongoDB database. I have the rest API urls. how can i access these api and fetch the data from there so that i can use them in my application which uses MS SQL server as backend?

What I have tried:

I have no idea regarding this, so please i need some help

推荐答案

在另一个问题的答案中查看客户端代码:如何在发布数据后阅读webclient响应? Webclient.uploaddata方法(字符串,字符串,字节[]) [ ^ ] ...同样的原则适用于您的ASP.Net应用...
Have a look at the client code in this answer to another question: How to read a webclient response after posting data? Webclient.uploaddata method (string, string, byte[])[^] ... Same principle applies to your ASP.Net app...


这篇关于如何从ASP.NET 2008应用程序调用rest API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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