Please use System.Net.Http.HttpClient instead.
This is some kind of a RestSharp port as PCL and for .NET Core.
This project is licensed using the BSD 2-Clause License
RestSharp.Portable can use either HttpWebRequest
or HttpClient
as request engine.
Advantage:
- Mature
Disadvantage:
- Not configurable
Advantage:
- Configurable (maybe better performance on iOS/Adroid through ModernHttpClient)
Disadvantage:
- Behaves differently on different platforms
- .NET Core
- .NET Framework 4
- .NET for Windows Store apps
- .NET Native
- Windows Phone 8 and 8.1
- Silverlight 5
- Portable Class Libraries
- Xamarin Android
- Xamarin MonoTouch / iOS
The following is an example to get the ticker from the bitstamp.net website.
public class TickerResult
{
public decimal Last { get; set; }
public decimal High { get; set; }
public decimal Low { get; set; }
public decimal Volume { get; set; }
public decimal Bid { get; set; }
public decimal Ask { get; set; }
}
We use the class with:
using (var client = new RestClient(new Uri("https://www.bitstamp.net/api/")))
{
var request = new RestRequest("ticker", Method.GET);
var result = await client.Execute<TickerResult>(request);
}
The support for community projects can be found in my subreddit /r/FubarDev.
You can get professional support here: Fubar Development Junker