When I try the above code, I get "use of undeclared identifier 'client' " on line 8:
#include <boost/network/protocol/http/client.hpp>
#include <boost/network.hpp>
using namespace boost::network;
using namespace boost::network::http;
int main():
{client::request request_("https://www.youtube.com/results?search_query=a");
request_ << header("Connection", "close");
client client_;
client::response response_ = client_.get(request_);
std::string body_ = body(response_);
}
I want to get the title of the first YouTube video search result and I'm trying to do like this. Thanks for your help!
Aucun commentaire:
Enregistrer un commentaire