开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜