Search code examples
c#restportable-class-library

Are there any REST libraries out there that work with Portable Class Libraries?


I am developing a portable class library that needs to make REST requests and am looking for something like Restsharp or EasyHttp. Unfortunately neither of these currently work with PCLs. It would also be nice to either see an example that does a post request with basic authentication.

If there is nothing out does anyone have an example of how I would do a post request with basic authentication?


Solution

  • if you target 4.5 or Windows Store apps you can use HttpClient as PCL. Otherwise you can try the hack and slash PCL port of RestSharp at https://github.com/Geodan/geoserver-csharp/tree/master/RestSharp