cocos2d/cocos2d-x — pull request #3870 by martell (2013-09-30 16:55:32+00:00)
Title: Added HttpClient for WP8 and WinRT using Windows::networking::sockets

This is an initial import to add support for HttpClient into extensions for WinRT and WP8.
This has been taken from the WP8 and WinRT directX port done by Atom Split Games

It uses
1. c++11 threading instead of pthreads as pthreads is not supported on winrt.
2. Windows::Networking::Sockets instead of libcurl as winsock is not available on WinRT

One last issue must be fixed currently you must do this with http requests.

#if ((CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8))
m_urltype = new string("Content-Type: application/x-www-form-urlencoded");
#else
m_urltype = new string("application/x-www-form-urlencoded; charset=utf-8");
#endif

the way Windows networking sockets handles headers is strange.
I will fix this in an update with a work around should be very a simple fix.

Also note windows networking sockets must have either http:// or https:// in the url.
Curl tends to handle the request if you don't specify the protocol.

Check out this first app using it here
http://apps.microsoft.com/windows/en-ie/app/56c0be05-ff43-4ae3-9330-faa0b84498a6

Martell Out ;)