Add HttpClient support in Portable Class Libraries (including Windows Phone 8)
We’re happy to announce that we shipped a public beta. More details are available here:
Dominic: Sounds like you are hitting http://support.microsoft.com/kb/2840147. Either repair VS Update 2 - or install the RC of VS Update 3.
Dominic Ferland commented
It work great for me until i install the Visual Studio 2012 Update 2.
I'm getting this compilation error when building my portable class library:
The Type 'System.Net.HttpStatusCode' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=18.104.22.168, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
I have done the test on 2 different computer... and after installing the update 2... the solutions dont compile anymore.
Have you seen that before ?
Alexander Gnauck commented
I need to connect to https sites which self signed certificates, or signed by a CA which is not trusted by Windows Phone by default. Is there solution using this library, or is this on the roadmap?
or is this only a wrapper to HttpWebRequest which does not support this feature on Windows Phone?
Xavier: The project is still alive. By "barfed" what do you mean? Didn't install? If so, try upgrading your version of NuGet to the latest.
xavier rigau commented
Is this project still alive? I tried to download it for a Windows Phone 8 solution and it barfed.
Ricardo Wickel commented
I'm also waiting for System.Net.Http.Formatting
Tony Tedeschi commented
I was hoping that the full HttpClient would have been in the mix. I would love to consume JSON content from a Web API site. The full client supports PutAsJsonAsync<T>(...) which could enable a windows phone device to consume a web api with very minimal traffic.
Is the full HttpClient being considered? It would be great to leverage the super light weight data flows from the JSON in the ew WebApi framework.
Michael Lant commented
Please make sure that it supports the .result capability to force the call to be synchronous. This is a very important construct that allows the entire call stack to be wrapped inside of a Task.run() call. It makes the whole async isssue drop-dead simple.
Thanks.. that's a fantastic news for any .NET developer!
@Rui Marinho, follow the blog link and read it. It sates that WP7.5+ is supported. So YES they didn't forget about 7.5!
영재 김 commented
God bless you,Kean.
I'm impressed to hear good news :)
Rui Marinho commented
Please don't forget to add support to windows phone 7.5 too.. :)
I am very please to ear that it is into the roadmap. Thanks :)
영재 김 commented
I'm developing WinRT+.NET4.5 with PCL. The PCL consumes REST with httpClient. I want to release WP7.8 app with same library. please support this...Only WP8 also can be helpful.
I haven't started developing for RT or WP8 yet but was thinking about giving it a go (currently I tend to do backend). Considering how awesome the net HttpClient is compared to HttpWebRequest and how connectivity is almost expected in apps these days making this change would definitely get me started.
Please add it!
Nick Sologoub commented
Need this badly! Please!
Toby Evans commented
Yes please, with Windows Phone 8 too. Will be really handy
Thanks for the great suggestion Igor - it's good to know that our new HTTP stack is popular enough that you want to use it everywhere. Keep the votes coming!