开发者

HTTP queries in C++ for Mac

开发者 https://www.devze.com 2023-02-04 19:58 出处:网络
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.

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

精彩评论

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