C# REST API 客户端 [英] C# REST API Client
问题描述
我已成功创建了一个驻留在我的服务器上的 PHP REST API.我现在希望通过我的 WPF C# 应用程序创建客户端连接.我找到了 this 但我的 API 需要通过 HTTP 标头发送 API 密钥,我看不出你能做到这一点.我还使用 CURL 创建了一个 PHP REST 客户端,它非常简单,并且希望 C# 中可以内置一些东西来处理对 REST 服务的请求.
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.
也适用于所有平台:Web、Windows、WCF、Monotouch、Windows Phone
Works on all platforms too: Web, Windows, WCF, Monotouch, Windows Phone
这篇关于C# REST API 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!