Skip to content
This repository was archived by the owner on Apr 10, 2018. It is now read-only.

Repository files navigation

Portable RestSharp

THIS PROJECT IS NO LONGER MAINTAINED

Please use System.Net.Http.HttpClient instead.

Old README contents

Build status

Join the chat at https://gitter.im/FubarDevelopment/restsharp.portable

This is some kind of a RestSharp port as PCL and for .NET Core.

License

This project is licensed using the BSD 2-Clause License

NuGet packages

DescriptionBadge
Core libraryFubarCoder.RestSharp.Portable.Core
Request engine using HttpWebRequestFubarCoder.RestSharp.Portable.WebRequest
Request engine using HttpClientFubarCoder.RestSharp.Portable.HttpClient
OAuth 1.0(a) authentication supportFubarCoder.RestSharp.Portable.OAuth1
OAuth 2.0 authentication supportFubarCoder.RestSharp.Portable.OAuth2
Content encoding support (GZip/Deflate)FubarCoder.RestSharp.Portable.Encodings

Request engines

RestSharp.Portable can use either HttpWebRequest or HttpClient as request engine.

HttpWebRequest request engine

Advantage:

  • Mature

Disadvantage:

  • Not configurable

HttpClient request engine

Advantage:

Disadvantage:

  • Behaves differently on different platforms

Supported 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

Small example

The following is an example to get the ticker from the bitstamp.net website.

The result class

publicclassTickerResult{publicdecimalLast{get;set;}publicdecimalHigh{get;set;}publicdecimalLow{get;set;}publicdecimalVolume{get;set;}publicdecimalBid{get;set;}publicdecimalAsk{get;set;}}

We use the class with:

using(varclient=newRestClient(newUri("https://www.bitstamp.net/api/"))){varrequest=newRestRequest("ticker",Method.GET);varresult=awaitclient.Execute<TickerResult>(request);}

Contributors

Community Support

The support for community projects can be found in my subreddit /r/FubarDev.

Professional Support

You can get professional support here: Fubar Development Junker

About

Some kind of a RestSharp port to PCL

Resources

Stars

94 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages