我无法打印 http 请求的基础,因为迁移到野兽 1.70.0
我之前是通过以下方式完成的:
std::cerr << ctx.res.base()
但目前看起来运算符没有重载,如何在 1.70.0 中实现?
可以使用以下代码重现问题:(请注意应该使用野兽 1.70.0)
#include <boost/beast/http.hpp>
#include <boost/beast/http/write.hpp>
#include <iostream>
using namespace boost::beast;
http::response<http::string_body> res {};
int main()
{
std::cout << res.base();
}