I suggest you ...

Add HttpClient support in Portable Class Libraries (including Windows Phone 8)

1,887 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    IgorIgor shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    52 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Dominic FerlandDominic Ferland commented  ·   ·  Flag as inappropriate

        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=2.0.5.0, 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 ?

        Dominic

      • Alexander GnauckAlexander Gnauck commented  ·   ·  Flag as inappropriate

        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?

      • David KeanDavid Kean commented  ·   ·  Flag as inappropriate

        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 rigauxavier rigau commented  ·   ·  Flag as inappropriate

        Is this project still alive? I tried to download it for a Windows Phone 8 solution and it barfed.

      • Tony TedeschiTony Tedeschi commented  ·   ·  Flag as inappropriate

        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 LantMichael Lant commented  ·   ·  Flag as inappropriate

        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.

      • TrooperTrooper commented  ·   ·  Flag as inappropriate

        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  ·   ·  Flag as inappropriate

        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.

      • ChaoChao commented  ·   ·  Flag as inappropriate

        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.

      • David KeanDavid Kean commented  ·   ·  Flag as inappropriate

        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!

        David Kean
        BCL Team

      ← Previous 1 3

      Feedback and Knowledge Base