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 committed 2017-07-20 08:12:17 -07:00
1 parent cd2363e951
commit f7211da154
21 files changed
+737 -79

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ int main(int, char const*[])
connect(sock, it);
auto ep = sock.remote_endpoint();
request<string_body> req;
req.method("GET");
req.method(verb::get);
req.target("/");
req.version = 11;
req.fields.insert("Host", host + std::string(":") +
+1 -1
View File
@@ -24,7 +24,7 @@ int main()
// Send HTTP request 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.replace("Host", host + ":" +
+1 -1
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 + ":" +