Forum Cross Platform with Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

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

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


Sign In or Register to comment.