forked from boostorg/beast
New BodyReader and BodyWriter constructors (API Change):
fix #884 * BodyReader and BodyWriter constructors now require the header and body elements to be passed as distinct header and value_type objects. This enables the composition of body types, for example: http::response<compressed_body<http::string_body>> res; * The previous single-argument constructors are deprecated and will be removed in a subsequent version. Actions Required: * Change user-defined instances of BodyReader or BodyWriter constructor signatures to the two-argument form. OR * Define the macro BOOST_BEAST_ALLOW_DEPRECATED in the project (which will accept both the new and the deprecated signatures).
This commit is contained in:
committed by
Vinnie Falco
parent
d796319476
commit
b76ab4450a
@@ -48,9 +48,8 @@ public:
|
||||
|
||||
template<bool isRequest, class Fields>
|
||||
explicit
|
||||
writer(message<isRequest,
|
||||
unsized_body, Fields> const& msg)
|
||||
: body_(msg.body())
|
||||
writer(header<isRequest, Fields> const&, value_type const& b)
|
||||
: body_(b)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -93,9 +92,8 @@ public:
|
||||
|
||||
template<bool isRequest, class Fields>
|
||||
explicit
|
||||
writer(message<isRequest,
|
||||
test_body, Fields> const& msg)
|
||||
: body_(msg.body())
|
||||
writer(header<isRequest, Fields> const&, value_type const& b)
|
||||
: body_(b)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -230,9 +228,8 @@ public:
|
||||
|
||||
template<bool isRequest, class Fields>
|
||||
explicit
|
||||
writer(message<isRequest,
|
||||
fail_body, Fields> const& msg)
|
||||
: body_(msg.body())
|
||||
writer(header<isRequest, Fields> const&, value_type const& b)
|
||||
: body_(b)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user