Refine message class hierarchy:

Two new objects, request_headers and response_headers,
represent the portion of HTTP messages excluding the body.
This commit is contained in:
Vinnie Falco
2016-10-20 17:22:36 -04:00
parent cf43f516d2
commit ada1f60e3e
31 changed files with 569 additions and 487 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ int main(int, char const*[])
ip::tcp::socket sock(ios);
connect(sock, it);
auto ep = sock.remote_endpoint();
request_v1<empty_body> req;
request<empty_body> req;
req.method = "GET";
req.url = "/";
req.version = 11;
@@ -44,7 +44,7 @@ int main(int, char const*[])
req.headers.insert("User-Agent", "beast/http");
prepare(req);
write(sock, req);
response_v1<string_body> res;
response<string_body> res;
streambuf sb;
beast::http::read(sock, sb, res);
std::cout << res;