How to get boost::beast HTTP response status code
// Read & parse the response
beast::flat_buffer buffer;
http::response<http::dynamic_body> res;
http::read(stream, buffer, res);
// Print status code, e.g. 200
cout << res.result_int() << endl;
// Read & parse the response
beast::flat_buffer buffer;
http::response<http::dynamic_body> res;
http::read(stream, buffer, res);
// Print status code, e.g. 200
cout << res.result_int() << endl;