Code Monkey home page Code Monkey logo

restsharp.portable's Introduction

Portable RestSharp

Build status

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

This is some kind of a RestSharp port to PCL.

License

This project is licensed using the BSD 2-Clause License

NuGet packages

Description Badge
Core library FubarCoder.RestSharp.Portable.Core
Request engine using HttpWebRequest FubarCoder.RestSharp.Portable.WebRequest
Request engine using HttpClient FubarCoder.RestSharp.Portable.HttpClient
OAuth 1.0(a) authentication support FubarCoder.RestSharp.Portable.OAuth
OAuth 2.0 authentication support FubarCoder.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:

  • Configurable (maybe better performance on iOS/Adroid through ModernHttpClient)

Disadvantage:

  • Behaves differently on different platforms

Supported platforms

  • .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

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);
}

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

restsharp.portable's People

Contributors

fubar-coder avatar evnik avatar gitter-badger avatar rreverser avatar jchannon avatar p2sh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.