// Read & parse the response beast::flat_buffer buffer; http::response<http::dynamic_body> res; http::read(stream, buffer, res); // Iterate response headers for (auto it = res.begin(); it != res.end(); ++it) { std::cout << it->name_string() << ": " << it->value() << "\n"; } // ... or get one specific header cout << res["Content-Length"] << endl;