summaryrefslogtreecommitdiff
path: root/redfish-core/include/node.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-10-25 02:30:02 +0300
committerJames Feist <james.feist@linux.intel.com>2020-07-16 19:30:30 +0300
commitb41187fac9d82be2ea26bd8695f2beba135e80f1 (patch)
tree1a0dd10ee2c3d2e470e9ccbfe7cb7171753673e1 /redfish-core/include/node.hpp
parent3909dc82a003893812f598434d6c4558107afa28 (diff)
downloadbmcweb-b41187fac9d82be2ea26bd8695f2beba135e80f1.tar.xz
Deprecate the "" operator, and isEqP
While a cool example of how to do string matching in constexpr space, the set of verbs available to HTTP has been fixed for a very long time. This was ported over to beast a while back, but we kept the API for.... mediocre reasons of backward compatibility. Remove that, and delete the now unused code. Tested: Built and loaded on a Witherspoon. Validator passes. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: Iaf048e196f9b6e71983189877203bf80390df286 Signed-off-by: James Feist <james.feist@linux.intel.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'redfish-core/include/node.hpp')
-rw-r--r--redfish-core/include/node.hpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/redfish-core/include/node.hpp b/redfish-core/include/node.hpp
index 2f4cb6b3dd..74d511fcb6 100644
--- a/redfish-core/include/node.hpp
+++ b/redfish-core/include/node.hpp
@@ -58,39 +58,39 @@ class Node
{
crow::DynamicRule& get = app.routeDynamic(entityUrl.c_str());
getRule = &get;
- get.methods("GET"_method)([this](const crow::Request& req,
- crow::Response& res,
- Params... params) {
- std::vector<std::string> paramVec = {params...};
- doGet(res, req, paramVec);
- });
+ get.methods(boost::beast::http::verb::get)(
+ [this](const crow::Request& req, crow::Response& res,
+ Params... params) {
+ std::vector<std::string> paramVec = {params...};
+ doGet(res, req, paramVec);
+ });
crow::DynamicRule& patch = app.routeDynamic(entityUrl.c_str());
patchRule = &patch;
- patch.methods("PATCH"_method)([this](const crow::Request& req,
- crow::Response& res,
- Params... params) {
- std::vector<std::string> paramVec = {params...};
- doPatch(res, req, paramVec);
- });
+ patch.methods(boost::beast::http::verb::patch)(
+ [this](const crow::Request& req, crow::Response& res,
+ Params... params) {
+ std::vector<std::string> paramVec = {params...};
+ doPatch(res, req, paramVec);
+ });
crow::DynamicRule& post = app.routeDynamic(entityUrl.c_str());
postRule = &post;
- post.methods("POST"_method)([this](const crow::Request& req,
- crow::Response& res,
- Params... params) {
- std::vector<std::string> paramVec = {params...};
- doPost(res, req, paramVec);
- });
+ post.methods(boost::beast::http::verb::post)(
+ [this](const crow::Request& req, crow::Response& res,
+ Params... params) {
+ std::vector<std::string> paramVec = {params...};
+ doPost(res, req, paramVec);
+ });
crow::DynamicRule& delete_ = app.routeDynamic(entityUrl.c_str());
deleteRule = &delete_;
- delete_.methods("DELETE"_method)([this](const crow::Request& req,
- crow::Response& res,
- Params... params) {
- std::vector<std::string> paramVec = {params...};
- doDelete(res, req, paramVec);
- });
+ delete_.methods(boost::beast::http::verb::delete_)(
+ [this](const crow::Request& req, crow::Response& res,
+ Params... params) {
+ std::vector<std::string> paramVec = {params...};
+ doDelete(res, req, paramVec);
+ });
}
void initPrivileges()