forked from boostorg/beast
message::version is a member function (API Change):
fix #778 * The version data member is replaced with accessor member functions. Actions Required: * Call member function message::version instead of accessing the version member at call sites.
This commit is contained in:
@@ -45,7 +45,7 @@ void fxx() {
|
||||
//[http_snippet_2
|
||||
|
||||
request<empty_body> req;
|
||||
req.version = 11; // HTTP/1.1
|
||||
req.version(11); // HTTP/1.1
|
||||
req.method(verb::get);
|
||||
req.target("/index.htm");
|
||||
req.set(field::accept, "text/html");
|
||||
@@ -58,7 +58,7 @@ void fxx() {
|
||||
//[http_snippet_3
|
||||
|
||||
response<string_body> res;
|
||||
res.version = 11; // HTTP/1.1
|
||||
res.version(11); // HTTP/1.1
|
||||
res.result(status::ok);
|
||||
res.set(field::server, "Beast");
|
||||
res.body() = "Hello, world!";
|
||||
@@ -112,7 +112,7 @@ void fxx() {
|
||||
//[http_snippet_7
|
||||
|
||||
response<string_body> res;
|
||||
res.version = 11;
|
||||
res.version(11);
|
||||
res.result(status::ok);
|
||||
res.set(field::server, "Beast");
|
||||
res.body() = "Hello, world!";
|
||||
|
||||
Reference in New Issue
Block a user