How to make web request from Portable Class Library project?

Hi all, I'm new to Xamarin. Very new. Just experimenting at this stage to see what Xamarin is capable of.

So far I've made a simple solution with three projects: an Android application project, an iPhone application project, and a Portable Class Library (PCL) project.

I'm now trying to perform a simple web request from my PCL project which I can call from my Android and iPhone application projects.

I was following the Xamarin web services guide...

http://docs.xamarin.com/guides/cross-platform/application_fundamentals/web_services/

... and wanted to make a web request via the HttpWebResponse.GetResponse() method but this method is not available to me in my PCL project! Does anyone have an example of how to make a web request using HttpWebResponse in a PCL project??

Or, alternatively, I've downloaded the latest RestSharp zip (104.1) but I'm seeing different dlls in there (for Net4, Silverlight, Windows Phone etc). Which dll (if any) could I reference in my PCL project for Android and iPhone web requests?

Posts

Sign In or Register to comment.