curlpp

C++ wrapper library for libcURL with object-oriented HTTP requests

brewmacoslinux
Try with needOr install directly
Source

About

C++ wrapper for libcURL

Examples

make HTTP GET request from C++ code$ curlpp::Easy easy; easy.setOpt(new curlpp::options::Url("http://example.com")); easy.perform();
send POST request with data in C++ application$ curlpp::Easy easy; easy.setOpt(new curlpp::options::Url("http://api.example.com")); easy.setOpt(new curlpp::options::PostFields("key=value"));
set custom headers for HTTP request$ std::list<std::string> headers; headers.push_back("Content-Type: application/json"); easy.setOpt(new curlpp::options::HttpHeader(headers));
download file and save to disk in C++$ std::ofstream file("output.bin"); curlpp::Easy easy; easy.setOpt(new curlpp::options::Url("http://example.com/file.zip")); easy.setOpt(new curlpp::options::WriteStream(&file));
handle SSL certificate verification in requests$ easy.setOpt(new curlpp::options::SslVerifyPeer(false)); easy.setOpt(new curlpp::options::SslVerifyHost(0));