-2

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?

VP.
  • 15,509
  • 17
  • 91
  • 161

1 Answers1

1

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_);
Community
  • 1
  • 1
schrieveslaach
  • 1,689
  • 1
  • 15
  • 32