forked from boostorg/beast
Refactor header and message constructors:
fix #581 * request and response headers now have convenience constructors so important fields like method, target, result, and version may be set upon construction. Actions Required: * Evaluate each message constructor call site and adjust the constructor argument list as needed.
This commit is contained in:
@@ -27,10 +27,11 @@ public:
|
||||
{
|
||||
static_assert(is_body_reader<string_view_body>::value, "");
|
||||
static_assert(! is_body_writer<string_view_body>::value, "");
|
||||
request<string_view_body> req{"Hello, world!"};
|
||||
request<string_view_body> req;
|
||||
req.version = 11;
|
||||
req.method(verb::post);
|
||||
req.target("/");
|
||||
req.body = "Hello, world!";
|
||||
req.prepare_payload();
|
||||
static_buffer_n<512> b;
|
||||
ostream(b) << req;
|
||||
|
||||
Reference in New Issue
Block a user