What C++ library should I use to implement a HTTP client? [closed]

Curl++: is an option, particularly if you want things in more of a C++ style.

cpp-netlib: very good and simple to use, available on ubuntu

sudo apt-get install libcppnetlib-dev

example:

using namespace boost::network;
using namespace boost::network::http;

client::request request_("http://127.0.0.1:8000/");
request_ << header("Connection", "close");
client client_;
client::response response_ = client_.get(request_);
std::string body_ = body(response_);

Leave a Comment