我在理解 cpp netlib 文档时遇到了一些麻烦。
member name type description
headers vector<header> Vector of headers.
A header is a struct of type response_header<http::tags::http_server>.
An instance always has the members name and value both of which are of type string_type.
string_type is boost::network::string<http::tags::http_server>::type.
在我尝试访问标题时的代码中:
http_server::response_header headers[] = request.headers;
以上不编译。我知道这可能看起来很基本,但我是 C++ 新手。谁能指导我如何从请求中遍历标头?