I want to retrieve content from any website, which means I want to write a code in C++ language which download the content of any website and then save it to notepad file or any other supported file format.
Can anyone suggest about this?
I want to retrieve content from any website, which means I want to write a code in C++ language which download the content of any website and then save it to notepad file or any other supported file format.
Can anyone suggest about this?
Look at this question. In the answers you will find multiple libraries which implement HTTP clients in C++
.
In the documentations (for example here) you will find many examples.
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_);