/** * \file * The most simple example. * */ #include #include #include using namespace curlpp::options; int main(int, char **) { try { // That's all that is needed to do cleanup of used resources (RAII style). curlpp::Cleanup myCleanup; // Our request to be sent. curlpp::Easy myRequest; // Set the URL. myRequest.setOpt("http://example.com"); // Send request and get a result. // By default the result goes to standard output. myRequest.perform(); } catch(curlpp::RuntimeError & e) { std::cout << e.what() << std::endl; } catch(curlpp::LogicError & e) { std::cout << e.what() << std::endl; } return 0; }