diff --git a/redfish-core/include/node.hpp b/redfish-core/include/node.hpp
index b41439a..3fb0ce7 100644
--- a/redfish-core/include/node.hpp
+++ b/redfish-core/include/node.hpp
@@ -102,19 +102,19 @@
 
   virtual void doPatch(crow::response& res, const crow::request& req,
                        const std::vector<std::string>& params) {
-    res.code = static_cast<int>(HttpRespCode::METHOD_NOT_ALLOWED);
+    res.result(boost::beast::http::status::method_not_allowed);
     res.end();
   }
 
   virtual void doPost(crow::response& res, const crow::request& req,
                       const std::vector<std::string>& params) {
-    res.code = static_cast<int>(HttpRespCode::METHOD_NOT_ALLOWED);
+    res.result(boost::beast::http::status::method_not_allowed);
     res.end();
   }
 
   virtual void doDelete(crow::response& res, const crow::request& req,
                         const std::vector<std::string>& params) {
-    res.code = static_cast<int>(HttpRespCode::METHOD_NOT_ALLOWED);
+    res.result(boost::beast::http::status::method_not_allowed);
     res.end();
   }
 
@@ -127,14 +127,14 @@
     auto ctx =
         app.template get_context<crow::TokenAuthorization::Middleware>(req);
 
-    if (!isMethodAllowedForUser(req.method, entityPrivileges,
+    if (!isMethodAllowedForUser(req.method(), entityPrivileges,
                                 ctx.session->username)) {
-      res.code = static_cast<int>(HttpRespCode::METHOD_NOT_ALLOWED);
+      res.result(boost::beast::http::status::method_not_allowed);
       res.end();
       return;
     }
 
-    switch (req.method) {
+    switch (req.method()) {
       case "GET"_method:
         doGet(res, req, params);
         break;
@@ -152,7 +152,7 @@
         break;
 
       default:
-        res.code = static_cast<int>(HttpRespCode::NOT_FOUND);
+        res.result(boost::beast::http::status::not_found);
         res.end();
     }
     return;
diff --git a/redfish-core/include/privileges.hpp b/redfish-core/include/privileges.hpp
index 1341f36..e98debb 100644
--- a/redfish-core/include/privileges.hpp
+++ b/redfish-core/include/privileges.hpp
@@ -157,8 +157,8 @@
   std::bitset<MAX_PRIVILEGE_COUNT> privilegeBitset = 0;
 };
 
-using OperationMap =
-    boost::container::flat_map<crow::HTTPMethod, std::vector<Privileges>>;
+using OperationMap = boost::container::flat_map<boost::beast::http::verb,
+                                                std::vector<Privileges>>;
 
 /**
  * @brief Checks if given privileges allow to call an HTTP method
@@ -169,7 +169,7 @@
  * @return                 True if method allowed, false otherwise
  *
  */
-inline bool isMethodAllowedWithPrivileges(const crow::HTTPMethod method,
+inline bool isMethodAllowedWithPrivileges(const boost::beast::http::verb method,
                                           const OperationMap& operationMap,
                                           const Privileges& userPrivileges) {
   const auto& it = operationMap.find(method);
@@ -199,7 +199,7 @@
  * @return                 True if method allowed, false otherwise
  *
  */
-inline bool isMethodAllowedForUser(const crow::HTTPMethod method,
+inline bool isMethodAllowedForUser(const boost::beast::http::verb method,
                                    const OperationMap& operationMap,
                                    const std::string& user) {
   // TODO: load user privileges from configuration as soon as its available
