Refactor treatment of request-method (API Change):

fix #397

method enum class is added to represent all known request methods.
Functions are provided to convert from strings to and from the method
enumeration.

The fields container is modified to also work with the enum.
This commit is contained in:
Vinnie Falco
2017-05-30 06:58:40 -07:00
parent cd2363e951
commit f7211da154
21 changed files with 737 additions and 79 deletions

View File

@@ -35,7 +35,7 @@ int main()
// Send HTTP request over SSL using Beast
beast::http::request<beast::http::string_body> req;
req.method("GET");
req.method(beast::http::verb::get);
req.target("/");
req.version = 11;
req.fields.insert("Host", host + ":" +