forked from boostorg/beast
Refactor http::header contents (API Change):
fix #124 The http::header data members "method", "url", and "reason" are changed from data members, to pairs of get and set functions which forward the call to the Fields type used to instantiate the template. Previously, these data members were implemented using std::string. With this change, the implementation of the Fields type used to instantiate the template is now in control of the representation of those values. This permits custom memory allocation strategies including uniform use of the Allocator type already provided to beast::http::basic_fields.
This commit is contained in:
@@ -35,8 +35,8 @@ int main()
|
||||
|
||||
// Send HTTP request over SSL using Beast
|
||||
beast::http::request<beast::http::string_body> req;
|
||||
req.method = "GET";
|
||||
req.url = "/";
|
||||
req.method("GET");
|
||||
req.target("/");
|
||||
req.version = 11;
|
||||
req.fields.insert("Host", host + ":" +
|
||||
boost::lexical_cast<std::string>(sock.remote_endpoint().port()));
|
||||
|
||||
Reference in New Issue
Block a user