RESTful solution for C++ RRS feed

  • Question

  • I was wondering what my options were for consuming REST web services in C++.  I have a metro style DirectX application that would also like to communicate with the web. 

    I have tried to make a C# WinRT component that uses System.Net.Http.HttpClient. I'm able to load the component fine but if I make a call to a method that uses System.Net.Http.HttpClient I get access denied.  I have the internet capability checked in my C++ application. Testing this component in a C# application with the internet capability enabled I am able to communicate just fine. What's more, adding the C++ project's Package.appxmanifest into the C# component project allows my C++ application to communicate with the web (no access denied) for exactly one build, if I build again I once again get access denied.

    Any help would be appreciated, thanks!

    Wednesday, October 5, 2011 4:12 AM


  • I responded this on the other thread about generic REST API in C++.  For specific API for SkyDrive, the team is aware about the absence of a C++ API, and the right folks are thinking about it.


    As of now there is no WinRT API for doing this.  Even C# and JScript make use of functionality that comes with their respective frameworks (.NET Framework and WinJS respectively).

    I agree that having a common WinRT API for all languages would be the best thing.  But for now you may want to look at some existing C++ ways of doing this:

    • http://cpp-netlib.github.com/ : This is proposed to be a part of Boost
    • http://pocoproject.org/ : They have a good Http Client



    Tuesday, November 1, 2011 8:24 PM

All replies