message::body is a member function (API Change):

fix #778

* The body data member is replaced with accessor
  member functions.

Actions Required:

* Call member function message::body instead of accessing
  the data member at call sites.
This commit is contained in:
Vinnie Falco
2017-09-12 12:45:52 -07:00
parent 0d4d239d05
commit 54fe7cacf7
36 changed files with 248 additions and 182 deletions

View File

@ -78,7 +78,7 @@ public:
try
{
read(ts, b, m);
return m.body == body;
return m.body() == body;
}
catch(std::exception const& e)
{
@ -109,7 +109,7 @@ public:
req.method_string("POST");
req.target("/");
req.insert(field::user_agent, "test");
req.body = "Hello, world!";
req.body() = "Hello, world!";
req.prepare_payload();
error_code ec;
@ -142,7 +142,7 @@ public:
req.method_string("POST");
req.target("/");
req.insert(field::user_agent, "test");
req.body = "Hello, world!";
req.body() = "Hello, world!";
req.prepare_payload();
test::stream ds{ios_}, dsr{ios_};
@ -167,7 +167,7 @@ public:
});
BEAST_EXPECTS(! ec, ec.message());
BEAST_EXPECT(equal_body<true>(
usr.str(), req.body));
usr.str(), req.body()));
}
void
@ -273,7 +273,7 @@ public:
void
operator()(request<string_body>&& req)
{
body = req.body;
body = req.body();
}
};