HTTP queries in C++ for Mac
I am porting a Windows C++ program that uses winhttp.h for HTTP POST and GET. Please give suggesti开发者_如何学运维ons on what I can use in C++ for Mac instead of winhttp.h. Thanks
Are you using Cocoa? You can use [NSUrlConnection class][1].
Otherwise, you can use a portable HTTP client in C or C++ such as CURL/LIBCURL.
[1]: http://mywebsite.com/page.php?order=Bananas DESC
Why not use boost::asio? Simple to use and well designed C++ API for IP. Includes some samples for HTTP GET etc.
http://www.boost.org/doc/libs/1_45_0/doc/html/boost_asio.html
精彩评论