如何获取 boost::beast HTTP 响应状态码

boostbeast_response.cpp
// Read & parse the response
beast::flat_buffer buffer;
http::response<http::dynamic_body> res;
http::read(stream, buffer, res);

// 打印状态码,例如 200
cout << res.result_int() << endl;

Check out similar posts by category: Boost, C/C++