forked from boostorg/beast
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:
1 parent
cd2363e951
commit
f7211da154
21 files changed
+737
-79
No files matched your search
@@ -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(":") +
|
||||
|
||||
@@ -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 + ":" +
|
||||
|
||||
@@ -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 + ":" +
|
||||
|
||||
Reference in new issue
Block a user