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>
diff --git a/redfish-core/include/node.hpp b/redfish-core/include/node.hpp
index 2f4cb6b..74d511f 100644
--- a/redfish-core/include/node.hpp
+++ b/redfish-core/include/node.hpp
@@ -58,39 +58,39 @@
{
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()