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:
@@ -75,10 +75,7 @@ main(int, char const*[])
|
||||
}
|
||||
|
||||
// Set up an HTTP GET request
|
||||
http::request<http::string_body> req;
|
||||
req.version = 11;
|
||||
req.method(http::verb::get);
|
||||
req.target("/");
|
||||
http::request<http::string_body> req{http::verb::get, "/", 11};
|
||||
req.set(http::field::host, host + std::string(":") + std::to_string(ep.port()));
|
||||
req.set(http::field::user_agent, BEAST_VERSION_STRING);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user