C#REST API客户端 [英] C# REST API Client

查看:192
本文介绍了C#REST API客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地创建驻留在我的服务器上的PHP REST API。我现在正在创建通过我的WPF C#应用程序的客户端连接到这一点。我发现但我的API需要API密钥通过HTTP头发送,我看不到你能做到这一点在于此。我还创建使用curl一个PHP REST客户端,这是非常容易的,希望会有内置到C#的东西来处理请求休息服务。

I have successfully created a PHP REST API which resides on my server. I am now looking to create the client-side connection to this via my WPF C# application. I found this but my API requires the API key to be sent via a HTTP header, and I can't see you can do that in this. I also created a PHP REST client using CURL and it was very easy, and was hoping that there would be something built into C# to handle requests to REST services.

如果有人能指出我的教程的方向,他们都看到了,或出库的地方我将不胜感激。

If someone could point me in the direction of a tutorial they have seen, or a library somewhere I would be grateful.

感谢。

推荐答案

看看 RESTSharp 。功能非常强大,且易于使用。

Take a look at RESTSharp. Very powerful, and easy to use.

在所有平台上工作过:网络,Windows中,WCF,MonoTouch的,Windows Phone的

Works on all platforms too: Web, Windows, WCF, Monotouch, Windows Phone

这篇关于C#REST API客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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