message::prepare_payload replaces message::prepare (API Change):

Actions Required:

* Change calls to msg.prepare to msg.prepare_payload. For messages
  with a user-defined Fields, provide the function prepare_payload_impl
  in the fields type according to the Fields requirements.
This commit is contained in:
Vinnie Falco
2017-07-20 08:15:27 -07:00
parent f9f6e1e0cc
commit 56a561da9a
20 changed files with 398 additions and 114 deletions
+4 -4
View File
@@ -532,7 +532,7 @@ public:
m.version = 10;
m.insert(field::user_agent, "test");
m.body = "*";
m.prepare();
m.prepare_payload();
BEAST_EXPECT(str(m) ==
"GET / HTTP/1.0\r\n"
"User-Agent: test\r\n"
@@ -549,7 +549,7 @@ public:
m.version = 10;
m.insert(field::user_agent, "test");
m.body = "*";
m.prepare();
m.prepare_payload();
test::string_ostream ss(ios_);
error_code ec;
write(ss, m, ec);
@@ -569,7 +569,7 @@ public:
m.version = 11;
m.insert(field::user_agent, "test");
m.body = "*";
m.prepare();
m.prepare_payload();
BEAST_EXPECT(str(m) ==
"GET / HTTP/1.1\r\n"
"User-Agent: test\r\n"
@@ -586,7 +586,7 @@ public:
m.version = 11;
m.insert(field::user_agent, "test");
m.body = "*";
m.prepare();
m.prepare_payload();
test::string_ostream ss(ios_);
error_code ec;
write(ss, m, ec);