当前位置: 动力学知识库 > 问答 > 编程问答 >

HTTP queries in C++ for Mac

问题描述:

I am porting a Windows C++ program that uses winhttp.h for HTTP POST and GET.

Please give suggestions 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

分享给朋友:
您可能感兴趣的文章:
随机阅读: