Using AsyncResp everywhere

Get the core using AsyncResp everywhere, and not have each individual handler
creating its own object.We can call app.handle() without fear of the response
getting ended after the first tree is done populating.
Don't use res.end() anymore.

Tested:
1. Validator passed.

Signed-off-by: zhanghaicheng <zhanghch05@inspur.com>
Change-Id: I867367ce4a0caf8c4b3f4e07e06c11feed0782e8
diff --git a/redfish-core/include/node.hpp b/redfish-core/include/node.hpp
index 43506d5..1793a50 100644
--- a/redfish-core/include/node.hpp
+++ b/redfish-core/include/node.hpp
@@ -15,6 +15,7 @@
 */
 #pragma once
 
+#include "async_resp.hpp"
 #include "http_request.hpp"
 #include "http_response.hpp"
 #include "privileges.hpp"
@@ -35,7 +36,8 @@
 class Node
 {
   private:
-    bool redfishPreChecks(const crow::Request& req, crow::Response& res)
+    bool redfishPreChecks(const crow::Request& req,
+                          const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         std::string_view odataHeader = req.getHeaderValue("OData-Version");
         if (odataHeader.empty())
@@ -45,82 +47,88 @@
         }
         if (odataHeader != "4.0")
         {
-            redfish::messages::preconditionFailed(res);
-            res.end();
+            redfish::messages::preconditionFailed(asyncResp->res);
             return false;
         }
 
-        res.addHeader("OData-Version", "4.0");
+        asyncResp->res.addHeader("OData-Version", "4.0");
         return true;
     }
 
   public:
     template <typename... Params>
-    Node(App& app, std::string&& entityUrl, [[maybe_unused]] Params... paramsIn)
+    Node(App& app, std::string&& entityUrl,
+         [[maybe_unused]] Params... paramsIn) :
+        app(app)
     {
         crow::DynamicRule& get = app.routeDynamic(entityUrl.c_str());
         getRule = &get;
         get.methods(boost::beast::http::verb::get)(
-            [this](const crow::Request& req, crow::Response& res,
+            [this](const crow::Request& req,
+                   const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    Params... params) {
-                if (!redfishPreChecks(req, res))
+                if (!redfishPreChecks(req, asyncResp))
                 {
                     return;
                 }
                 std::vector<std::string> paramVec = {params...};
-                doGet(res, req, paramVec);
+                doGet(asyncResp, req, paramVec);
             });
 
         crow::DynamicRule& patch = app.routeDynamic(entityUrl.c_str());
         patchRule = &patch;
         patch.methods(boost::beast::http::verb::patch)(
-            [this](const crow::Request& req, crow::Response& res,
+            [this](const crow::Request& req,
+                   const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    Params... params) {
-                if (!redfishPreChecks(req, res))
+                if (!redfishPreChecks(req, asyncResp))
                 {
                     return;
                 }
                 std::vector<std::string> paramVec = {params...};
-                doPatch(res, req, paramVec);
+                doPatch(asyncResp, req, paramVec);
             });
 
         crow::DynamicRule& post = app.routeDynamic(entityUrl.c_str());
         postRule = &post;
         post.methods(boost::beast::http::verb::post)(
-            [this](const crow::Request& req, crow::Response& res,
+            [this](const crow::Request& req,
+                   const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    Params... params) {
-                if (!redfishPreChecks(req, res))
+                if (!redfishPreChecks(req, asyncResp))
                 {
                     return;
                 }
                 std::vector<std::string> paramVec = {params...};
-                doPost(res, req, paramVec);
+                doPost(asyncResp, req, paramVec);
             });
 
         crow::DynamicRule& put = app.routeDynamic(entityUrl.c_str());
         putRule = &put;
         put.methods(boost::beast::http::verb::put)(
-            [this](const crow::Request& req, crow::Response& res,
+            [this](const crow::Request& req,
+                   const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    Params... params) {
-                if (!redfishPreChecks(req, res))
+                if (!redfishPreChecks(req, asyncResp))
                 {
                     return;
                 }
                 std::vector<std::string> paramVec = {params...};
-                doPut(res, req, paramVec);
+                doPut(asyncResp, req, paramVec);
             });
 
         crow::DynamicRule& deleteR = app.routeDynamic(entityUrl.c_str());
         deleteRule = &deleteR;
         deleteR.methods(boost::beast::http::verb::delete_)(
-            [this](const crow::Request& req, crow::Response& res,
+            [this](const crow::Request& req,
+                   const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    Params... params) {
-                if (!redfishPreChecks(req, res))
+                if (!redfishPreChecks(req, asyncResp))
                 {
                     return;
                 }
                 std::vector<std::string> paramVec = {params...};
-                doDelete(res, req, paramVec);
+                doDelete(asyncResp, req, paramVec);
             });
     }
 
@@ -179,40 +187,36 @@
     crow::DynamicRule* deleteRule = nullptr;
 
   protected:
+    App& app;
     // Node is designed to be an abstract class, so doGet is pure virtual
-    virtual void doGet(crow::Response& res, const crow::Request&,
-                       const std::vector<std::string>&)
+    virtual void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                       const crow::Request&, const std::vector<std::string>&)
     {
-        res.result(boost::beast::http::status::method_not_allowed);
-        res.end();
+        asyncResp->res.result(boost::beast::http::status::method_not_allowed);
     }
 
-    virtual void doPatch(crow::Response& res, const crow::Request&,
-                         const std::vector<std::string>&)
+    virtual void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                         const crow::Request&, const std::vector<std::string>&)
     {
-        res.result(boost::beast::http::status::method_not_allowed);
-        res.end();
+        asyncResp->res.result(boost::beast::http::status::method_not_allowed);
     }
 
-    virtual void doPost(crow::Response& res, const crow::Request&,
-                        const std::vector<std::string>&)
+    virtual void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                        const crow::Request&, const std::vector<std::string>&)
     {
-        res.result(boost::beast::http::status::method_not_allowed);
-        res.end();
+        asyncResp->res.result(boost::beast::http::status::method_not_allowed);
     }
 
-    virtual void doPut(crow::Response& res, const crow::Request&,
-                       const std::vector<std::string>&)
+    virtual void doPut(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                       const crow::Request&, const std::vector<std::string>&)
     {
-        res.result(boost::beast::http::status::method_not_allowed);
-        res.end();
+        asyncResp->res.result(boost::beast::http::status::method_not_allowed);
     }
 
-    virtual void doDelete(crow::Response& res, const crow::Request&,
-                          const std::vector<std::string>&)
+    virtual void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                          const crow::Request&, const std::vector<std::string>&)
     {
-        res.result(boost::beast::http::status::method_not_allowed);
-        res.end();
+        asyncResp->res.result(boost::beast::http::status::method_not_allowed);
     }
 
     /* @brief Would the operation be allowed if the user did not have the
diff --git a/redfish-core/include/utils/collection.hpp b/redfish-core/include/utils/collection.hpp
index f1b7f21..b6603b9 100644
--- a/redfish-core/include/utils/collection.hpp
+++ b/redfish-core/include/utils/collection.hpp
@@ -23,7 +23,7 @@
  * @return void
  */
 inline void
-    getCollectionMembers(std::shared_ptr<AsyncResp> aResp,
+    getCollectionMembers(std::shared_ptr<bmcweb::AsyncResp> aResp,
                          const std::string& collectionPath,
                          const std::vector<const char*>& interfaces,
                          const char* subtree = "/xyz/openbmc_project/inventory")
diff --git a/redfish-core/include/utils/fw_utils.hpp b/redfish-core/include/utils/fw_utils.hpp
index 1e29139..c990023 100644
--- a/redfish-core/include/utils/fw_utils.hpp
+++ b/redfish-core/include/utils/fw_utils.hpp
@@ -32,7 +32,7 @@
  * @return void
  */
 inline void
-    populateFirmwareInformation(const std::shared_ptr<AsyncResp>& aResp,
+    populateFirmwareInformation(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                                 const std::string& fwVersionPurpose,
                                 const std::string& activeVersionPropName,
                                 const bool populateLinkToImages)
@@ -324,7 +324,7 @@
  *
  * @return void
  */
-inline void getFwStatus(const std::shared_ptr<AsyncResp>& asyncResp,
+inline void getFwStatus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                         const std::shared_ptr<std::string>& swId,
                         const std::string& dbusSvc)
 {
@@ -382,8 +382,9 @@
  * @param[i,o] asyncResp  Async response object
  * @param[i]   fwId       The firmware ID
  */
-inline void getFwUpdateableStatus(const std::shared_ptr<AsyncResp>& asyncResp,
-                                  const std::shared_ptr<std::string>& fwId)
+inline void
+    getFwUpdateableStatus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                          const std::shared_ptr<std::string>& fwId)
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp, fwId](const boost::system::error_code ec,
diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
index 0a3af5f..5872350 100644
--- a/redfish-core/include/utils/telemetry_utils.hpp
+++ b/redfish-core/include/utils/telemetry_utils.hpp
@@ -15,8 +15,9 @@
 constexpr const char* metricReportUri =
     "/redfish/v1/TelemetryService/MetricReports/";
 
-inline void getReportCollection(const std::shared_ptr<AsyncResp>& asyncResp,
-                                const std::string& uri)
+inline void
+    getReportCollection(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                        const std::string& uri)
 {
     const std::array<const char*, 1> interfaces = {reportInterface};
 
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 2703008..cedea22 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -118,10 +118,9 @@
     return "";
 }
 
-inline void userErrorMessageHandler(const sd_bus_error* e,
-                                    const std::shared_ptr<AsyncResp>& asyncResp,
-                                    const std::string& newUser,
-                                    const std::string& username)
+inline void userErrorMessageHandler(
+    const sd_bus_error* e, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+    const std::string& newUser, const std::string& username)
 {
     if (e == nullptr)
     {
@@ -206,7 +205,7 @@
  *
  */
 inline void handleRoleMapPatch(
-    const std::shared_ptr<AsyncResp>& asyncResp,
+    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
     const std::vector<std::pair<std::string, LDAPRoleMapData>>& roleMapObjData,
     const std::string& serverType, const std::vector<nlohmann::json>& input)
 {
@@ -580,11 +579,11 @@
      * @param userName  userName to be filled from the given JSON.
      * @param password  password to be filled from the given JSON.
      */
-    void
-        parseLDAPAuthenticationJson(nlohmann::json input,
-                                    const std::shared_ptr<AsyncResp>& asyncResp,
-                                    std::optional<std::string>& username,
-                                    std::optional<std::string>& password)
+    void parseLDAPAuthenticationJson(
+        nlohmann::json input,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+        std::optional<std::string>& username,
+        std::optional<std::string>& password)
     {
         std::optional<std::string> authType;
 
@@ -615,7 +614,8 @@
      */
 
     void parseLDAPServiceJson(
-        nlohmann::json input, const std::shared_ptr<AsyncResp>& asyncResp,
+        nlohmann::json input,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
         std::optional<std::vector<std::string>>& baseDNList,
         std::optional<std::string>& userNameAttribute,
         std::optional<std::string>& groupsAttribute)
@@ -650,7 +650,7 @@
 
     void handleServiceAddressPatch(
         const std::vector<std::string>& serviceAddressList,
-        const std::shared_ptr<AsyncResp>& asyncResp,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
         const std::string& ldapServerElementName,
         const std::string& ldapConfigObject)
     {
@@ -690,10 +690,11 @@
      server(openLDAP/ActiveDirectory)
      */
 
-    void handleUserNamePatch(const std::string& username,
-                             const std::shared_ptr<AsyncResp>& asyncResp,
-                             const std::string& ldapServerElementName,
-                             const std::string& ldapConfigObject)
+    void
+        handleUserNamePatch(const std::string& username,
+                            const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                            const std::string& ldapServerElementName,
+                            const std::string& ldapConfigObject)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp, username,
@@ -723,10 +724,11 @@
      *        server(openLDAP/ActiveDirectory)
      */
 
-    void handlePasswordPatch(const std::string& password,
-                             const std::shared_ptr<AsyncResp>& asyncResp,
-                             const std::string& ldapServerElementName,
-                             const std::string& ldapConfigObject)
+    void
+        handlePasswordPatch(const std::string& password,
+                            const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                            const std::string& ldapServerElementName,
+                            const std::string& ldapConfigObject)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp, password,
@@ -757,7 +759,7 @@
      */
 
     void handleBaseDNPatch(const std::vector<std::string>& baseDNList,
-                           const std::shared_ptr<AsyncResp>& asyncResp,
+                           const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                            const std::string& ldapServerElementName,
                            const std::string& ldapConfigObject)
     {
@@ -800,10 +802,11 @@
      server(openLDAP/ActiveDirectory)
      */
 
-    void handleUserNameAttrPatch(const std::string& userNameAttribute,
-                                 const std::shared_ptr<AsyncResp>& asyncResp,
-                                 const std::string& ldapServerElementName,
-                                 const std::string& ldapConfigObject)
+    void handleUserNameAttrPatch(
+        const std::string& userNameAttribute,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+        const std::string& ldapServerElementName,
+        const std::string& ldapConfigObject)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp, userNameAttribute,
@@ -835,10 +838,11 @@
      server(openLDAP/ActiveDirectory)
      */
 
-    void handleGroupNameAttrPatch(const std::string& groupsAttribute,
-                                  const std::shared_ptr<AsyncResp>& asyncResp,
-                                  const std::string& ldapServerElementName,
-                                  const std::string& ldapConfigObject)
+    void handleGroupNameAttrPatch(
+        const std::string& groupsAttribute,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+        const std::string& ldapServerElementName,
+        const std::string& ldapConfigObject)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp, groupsAttribute,
@@ -870,10 +874,11 @@
      server(openLDAP/ActiveDirectory)
      */
 
-    void handleServiceEnablePatch(bool serviceEnabled,
-                                  const std::shared_ptr<AsyncResp>& asyncResp,
-                                  const std::string& ldapServerElementName,
-                                  const std::string& ldapConfigObject)
+    void handleServiceEnablePatch(
+        bool serviceEnabled,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+        const std::string& ldapServerElementName,
+        const std::string& ldapConfigObject)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp, serviceEnabled,
@@ -895,8 +900,9 @@
             ldapEnableInterface, "Enabled", std::variant<bool>(serviceEnabled));
     }
 
-    void handleAuthMethodsPatch(nlohmann::json& input,
-                                const std::shared_ptr<AsyncResp>& asyncResp)
+    void handleAuthMethodsPatch(
+        nlohmann::json& input,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         std::optional<bool> basicAuth;
         std::optional<bool> cookie;
@@ -999,7 +1005,7 @@
      */
 
     void handleLDAPPatch(nlohmann::json& input,
-                         const std::shared_ptr<AsyncResp>& asyncResp,
+                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                          const std::string& serverType)
     {
         std::string dbusObjectPath;
@@ -1155,14 +1161,13 @@
             });
     }
 
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
         const persistent_data::AuthConfigMethods& authMethodsConfig =
             persistent_data::SessionStore::getInstance().getAuthMethodsConfig();
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.id", "/redfish/v1/AccountService"},
             {"@odata.type", "#AccountService."
                             "v1_5_0.AccountService"},
@@ -1255,11 +1260,10 @@
         getLDAPConfigData("ActiveDirectory", callback);
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         std::optional<uint32_t> unlockTimeout;
         std::optional<uint16_t> lockoutThreshold;
         std::optional<uint16_t> minPasswordLength;
@@ -1269,7 +1273,7 @@
         std::optional<nlohmann::json> oemObject;
 
         if (!json_util::readJson(
-                req, res, "AccountLockoutDuration", unlockTimeout,
+                req, asyncResp->res, "AccountLockoutDuration", unlockTimeout,
                 "AccountLockoutThreshold", lockoutThreshold,
                 "MaxPasswordLength", maxPasswordLength, "MinPasswordLength",
                 minPasswordLength, "LDAP", ldapObject, "ActiveDirectory",
@@ -1294,13 +1298,13 @@
         }
 
         if (std::optional<nlohmann::json> oemOpenBMCObject;
-            oemObject &&
-            json_util::readJson(*oemObject, res, "OpenBMC", oemOpenBMCObject))
+            oemObject && json_util::readJson(*oemObject, asyncResp->res,
+                                             "OpenBMC", oemOpenBMCObject))
         {
             if (std::optional<nlohmann::json> authMethodsObject;
                 oemOpenBMCObject &&
-                json_util::readJson(*oemOpenBMCObject, res, "AuthMethods",
-                                    authMethodsObject))
+                json_util::readJson(*oemOpenBMCObject, asyncResp->res,
+                                    "AuthMethods", authMethodsObject))
             {
                 if (authMethodsObject)
                 {
@@ -1374,15 +1378,16 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-        res.jsonValue = {{"@odata.id", "/redfish/v1/AccountService/Accounts"},
-                         {"@odata.type", "#ManagerAccountCollection."
-                                         "ManagerAccountCollection"},
-                         {"Name", "Accounts Collection"},
-                         {"Description", "BMC User Accounts"}};
+        asyncResp->res.jsonValue = {
+            {"@odata.id", "/redfish/v1/AccountService/Accounts"},
+            {"@odata.type", "#ManagerAccountCollection."
+                            "ManagerAccountCollection"},
+            {"Name", "Accounts Collection"},
+            {"Description", "BMC User Accounts"}};
 
         crow::connections::systemBus->async_method_call(
             [asyncResp, &req, this](const boost::system::error_code ec,
@@ -1426,18 +1431,17 @@
             "xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
             "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
     }
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         std::string username;
         std::string password;
         std::optional<std::string> roleId("User");
         std::optional<bool> enabled = true;
-        if (!json_util::readJson(req, res, "UserName", username, "Password",
-                                 password, "RoleId", roleId, "Enabled",
-                                 enabled))
+        if (!json_util::readJson(req, asyncResp->res, "UserName", username,
+                                 "Password", password, "RoleId", roleId,
+                                 "Enabled", enabled))
         {
             return;
         }
@@ -1554,11 +1558,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1708,10 +1711,11 @@
             "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1723,9 +1727,9 @@
         std::optional<bool> enabled;
         std::optional<std::string> roleId;
         std::optional<bool> locked;
-        if (!json_util::readJson(req, res, "UserName", newUserName, "Password",
-                                 password, "RoleId", roleId, "Enabled", enabled,
-                                 "Locked", locked))
+        if (!json_util::readJson(req, asyncResp->res, "UserName", newUserName,
+                                 "Password", password, "RoleId", roleId,
+                                 "Enabled", enabled, "Locked", locked))
         {
             return;
         }
@@ -1782,7 +1786,7 @@
             *newUserName);
     }
 
-    void updateUserProperties(std::shared_ptr<AsyncResp> asyncResp,
+    void updateUserProperties(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
                               const std::string& username,
                               std::optional<std::string> password,
                               std::optional<bool> enabled,
@@ -1916,10 +1920,10 @@
             });
     }
 
-    void doDelete(crow::Response& res, const crow::Request&,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request&,
                   const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (params.size() != 1)
         {
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
index 2c31077..0917cc7 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
@@ -17,11 +17,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Systems/system/Bios";
         asyncResp->res.jsonValue["@odata.type"] = "#Bios.v1_1_0.Bios";
@@ -56,10 +54,9 @@
      * Function handles POST method request.
      * Analyzes POST body message before sends Reset request data to D-Bus.
      */
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec) {
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index 7c10d6d..0e53571 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -53,26 +53,26 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.type", "#CertificateService.v1_0_0.CertificateService"},
             {"@odata.id", "/redfish/v1/CertificateService"},
             {"Id", "CertificateService"},
             {"Name", "Certificate Service"},
             {"Description", "Actions available to manage certificates"}};
-        res.jsonValue["CertificateLocations"] = {
+        asyncResp->res.jsonValue["CertificateLocations"] = {
             {"@odata.id",
              "/redfish/v1/CertificateService/CertificateLocations"}};
-        res.jsonValue["Actions"]["#CertificateService.ReplaceCertificate"] = {
+        asyncResp->res
+            .jsonValue["Actions"]["#CertificateService.ReplaceCertificate"] = {
             {"target", "/redfish/v1/CertificateService/Actions/"
                        "CertificateService.ReplaceCertificate"},
             {"CertificateType@Redfish.AllowableValues", {"PEM"}}};
-        res.jsonValue["Actions"]["#CertificateService.GenerateCSR"] = {
-            {"target", "/redfish/v1/CertificateService/Actions/"
-                       "CertificateService.GenerateCSR"}};
-        res.end();
+        asyncResp->res.jsonValue["Actions"]["#CertificateService.GenerateCSR"] =
+            {{"target", "/redfish/v1/CertificateService/Actions/"
+                        "CertificateService.GenerateCSR"}};
     }
 }; // CertificateService
 
@@ -100,9 +100,9 @@
     return -1;
 }
 
-inline std::string
-    getCertificateFromReqBody(const std::shared_ptr<AsyncResp>& asyncResp,
-                              const crow::Request& req)
+inline std::string getCertificateFromReqBody(
+    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+    const crow::Request& req)
 {
     nlohmann::json reqJson = nlohmann::json::parse(req.body, nullptr, false);
 
@@ -197,7 +197,7 @@
  * @param[in] csrObjPath CSR D-Bus object path
  * @return None
  */
-static void getCSR(const std::shared_ptr<AsyncResp>& asyncResp,
+static void getCSR(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    const std::string& certURI, const std::string& service,
                    const std::string& certObjPath,
                    const std::string& csrObjPath)
@@ -247,11 +247,12 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         static const int rsaKeyBitLength = 2048;
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         // Required parameters
         std::string city;
         std::string commonName;
@@ -561,9 +562,9 @@
  * @return None
  */
 static void getCertificateProperties(
-    const std::shared_ptr<AsyncResp>& asyncResp, const std::string& objectPath,
-    const std::string& service, long certId, const std::string& certURL,
-    const std::string& name)
+    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+    const std::string& objectPath, const std::string& service, long certId,
+    const std::string& certURL, const std::string& name)
 {
     using PropertyType =
         std::variant<std::string, uint64_t, std::vector<std::string>>;
@@ -685,13 +686,14 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         std::string certificate;
         nlohmann::json certificateUri;
         std::optional<std::string> certificateType = "PEM";
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         if (!json_util::readJson(req, asyncResp->res, "CertificateString",
                                  certificate, "CertificateUri", certificateUri,
                                  "CertificateType", certificateType))
@@ -811,10 +813,11 @@
             {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
     }
 
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -853,16 +856,16 @@
             {boost::beast::http::verb::delete_, {{"ConfigureComponents"}}},
             {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
     }
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.id",
              "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates"},
             {"@odata.type", "#CertificateCollection.CertificateCollection"},
             {"Name", "HTTPS Certificates Collection"},
             {"Description", "A Collection of HTTPS certificate instances"}};
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec,
                         const ManagedObjectType& certs) {
@@ -893,11 +896,12 @@
             certs::dbusObjManagerIntf, "GetManagedObjects");
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "HTTPSCertificateCollection::doPost";
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         asyncResp->res.jsonValue = {{"Name", "HTTPS Certificate"},
                                     {"Description", "HTTPS Certificate"}};
 
@@ -965,10 +969,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.id",
              "/redfish/v1/CertificateService/CertificateLocations"},
             {"@odata.type",
@@ -978,7 +982,7 @@
             {"Description",
              "Defines a resource that an administrator can use in order to "
              "locate all certificates installed on a given service"}};
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         nlohmann::json& links =
             asyncResp->res.jsonValue["Links"]["Certificates"];
         links = nlohmann::json::array();
@@ -1002,10 +1006,10 @@
      * @param[in] path  Path of the D-Bus service object
      * @return None
      */
-    void getCertificateLocations(std::shared_ptr<AsyncResp>& asyncResp,
-                                 const std::string& certURL,
-                                 const std::string& path,
-                                 const std::string& service)
+    void getCertificateLocations(
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+        const std::string& certURL, const std::string& path,
+        const std::string& service)
     {
         BMCWEB_LOG_DEBUG << "getCertificateLocations URI=" << certURL
                          << " Path=" << path << " service= " << service;
@@ -1054,15 +1058,15 @@
             {boost::beast::http::verb::delete_, {{"ConfigureComponents"}}},
             {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
     }
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.id", "/redfish/v1/AccountService/LDAP/Certificates"},
             {"@odata.type", "#CertificateCollection.CertificateCollection"},
             {"Name", "LDAP Certificates Collection"},
             {"Description", "A Collection of LDAP certificate instances"}};
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec,
                         const ManagedObjectType& certs) {
@@ -1094,10 +1098,11 @@
             certs::dbusObjManagerIntf, "GetManagedObjects");
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         std::string certFileBody = getCertificateFromReqBody(asyncResp, req);
 
         if (certFileBody.empty())
@@ -1161,10 +1166,11 @@
             {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
     }
 
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         long id = getIDFromURL(req.url);
         if (id < 0)
         {
@@ -1199,16 +1205,16 @@
             {boost::beast::http::verb::delete_, {{"ConfigureComponents"}}},
             {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
     }
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.id", "/redfish/v1/Managers/bmc/Truststore/Certificates/"},
             {"@odata.type", "#CertificateCollection.CertificateCollection"},
             {"Name", "TrustStore Certificates Collection"},
             {"Description",
              "A Collection of TrustStore certificate instances"}};
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec,
                         const ManagedObjectType& certs) {
@@ -1238,10 +1244,11 @@
             certs::dbusObjManagerIntf, "GetManagedObjects");
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         std::string certFileBody = getCertificateFromReqBody(asyncResp, req);
 
         if (certFileBody.empty())
@@ -1305,10 +1312,11 @@
             {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
     }
 
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         long id = getIDFromURL(req.url);
         if (id < 0)
         {
@@ -1329,10 +1337,10 @@
                                  "TrustStore Certificate");
     }
 
-    void doDelete(crow::Response& res, const crow::Request& req,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request& req,
                   const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (params.size() != 1)
         {
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index 01d6081..88f9fd7 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -34,7 +34,7 @@
  *
  * @return None.
  */
-inline void getChassisState(std::shared_ptr<AsyncResp> aResp)
+inline void getChassisState(std::shared_ptr<bmcweb::AsyncResp> aResp)
 {
     crow::connections::systemBus->async_method_call(
         [aResp{std::move(aResp)}](
@@ -86,7 +86,7 @@
 
 using PropertiesType = boost::container::flat_map<std::string, VariantType>;
 
-inline void getIntrusionByService(std::shared_ptr<AsyncResp> aResp,
+inline void getIntrusionByService(std::shared_ptr<bmcweb::AsyncResp> aResp,
                                   const std::string& service,
                                   const std::string& objPath)
 {
@@ -121,7 +121,7 @@
 /**
  * Retrieves physical security properties over dbus
  */
-inline void getPhysicalSecurityData(std::shared_ptr<AsyncResp> aResp)
+inline void getPhysicalSecurityData(std::shared_ptr<bmcweb::AsyncResp> aResp)
 {
     crow::connections::systemBus->async_method_call(
         [aResp{std::move(aResp)}](
@@ -176,14 +176,13 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#ChassisCollection.ChassisCollection";
-        res.jsonValue["@odata.id"] = "/redfish/v1/Chassis";
-        res.jsonValue["Name"] = "Chassis Collection";
-
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#ChassisCollection.ChassisCollection";
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Chassis";
+        asyncResp->res.jsonValue["Name"] = "Chassis Collection";
 
         collection_util::getCollectionMembers(
             asyncResp, "/redfish/v1/Chassis",
@@ -213,7 +212,8 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         const std::array<const char*, 2> interfaces = {
@@ -224,13 +224,11 @@
         // impossible.
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
         const std::string& chassisId = params[0];
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         crow::connections::systemBus->async_method_call(
             [asyncResp, chassisId(std::string(chassisId))](
                 const boost::system::error_code ec,
@@ -427,19 +425,19 @@
         getPhysicalSecurityData(asyncResp);
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
         std::optional<bool> locationIndicatorActive;
         std::optional<std::string> indicatorLed;
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (params.size() != 1)
         {
             return;
         }
 
-        if (!json_util::readJson(req, res, "LocationIndicatorActive",
+        if (!json_util::readJson(req, asyncResp->res, "LocationIndicatorActive",
                                  locationIndicatorActive, "IndicatorLED",
                                  indicatorLed))
         {
@@ -453,9 +451,9 @@
         }
         if (indicatorLed)
         {
-            res.addHeader(boost::beast::http::field::warning,
-                          "299 - \"IndicatorLED is deprecated. Use "
-                          "LocationIndicatorActive instead.\"");
+            asyncResp->res.addHeader(boost::beast::http::field::warning,
+                                     "299 - \"IndicatorLED is deprecated. Use "
+                                     "LocationIndicatorActive instead.\"");
         }
 
         const std::array<const char*, 2> interfaces = {
@@ -552,7 +550,8 @@
     }
 };
 
-inline void doChassisPowerCycle(const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    doChassisPowerCycle(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     const char* busName = "xyz.openbmc_project.ObjectMapper";
     const char* path = "/xyz/openbmc_project/object_mapper";
@@ -631,13 +630,13 @@
      * Function handles POST method request.
      * Analyzes POST body before sending Reset request data to D-Bus.
      */
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "Post Chassis Reset.";
 
         std::string resetType;
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (!json_util::readJson(req, asyncResp->res, "ResetType", resetType))
         {
@@ -683,28 +682,28 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
         const std::string& chassisId = params[0];
 
-        res.jsonValue = {{"@odata.type", "#ActionInfo.v1_1_2.ActionInfo"},
-                         {"@odata.id", "/redfish/v1/Chassis/" + chassisId +
-                                           "/ResetActionInfo"},
-                         {"Name", "Reset Action Info"},
-                         {"Id", "ResetActionInfo"},
-                         {"Parameters",
-                          {{{"Name", "ResetType"},
-                            {"Required", true},
-                            {"DataType", "String"},
-                            {"AllowableValues", {"PowerCycle"}}}}}};
-        res.end();
+        asyncResp->res.jsonValue = {
+            {"@odata.type", "#ActionInfo.v1_1_2.ActionInfo"},
+            {"@odata.id",
+             "/redfish/v1/Chassis/" + chassisId + "/ResetActionInfo"},
+            {"Name", "Reset Action Info"},
+            {"Id", "ResetActionInfo"},
+            {"Parameters",
+             {{{"Name", "ResetType"},
+               {"Required", true},
+               {"DataType", "String"},
+               {"AllowableValues", {"PowerCycle"}}}}}};
     }
 };
 
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index f7cffcc..2647672 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -696,7 +696,7 @@
  * @return None
  */
 inline void deleteIPv4(const std::string& ifaceId, const std::string& ipHash,
-                       const std::shared_ptr<AsyncResp>& asyncResp)
+                       const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp](const boost::system::error_code ec) {
@@ -723,7 +723,7 @@
  */
 inline void createIPv4(const std::string& ifaceId, uint8_t prefixLength,
                        const std::string& gateway, const std::string& address,
-                       const std::shared_ptr<AsyncResp>& asyncResp)
+                       const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp](const boost::system::error_code ec) {
@@ -752,11 +752,11 @@
  *
  * @return None
  */
-inline void deleteAndCreateIPv4(const std::string& ifaceId,
-                                const std::string& id, uint8_t prefixLength,
-                                const std::string& gateway,
-                                const std::string& address,
-                                const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    deleteAndCreateIPv4(const std::string& ifaceId, const std::string& id,
+                        uint8_t prefixLength, const std::string& gateway,
+                        const std::string& address,
+                        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp, ifaceId, address, prefixLength,
@@ -793,7 +793,7 @@
  * @return None
  */
 inline void deleteIPv6(const std::string& ifaceId, const std::string& ipHash,
-                       const std::shared_ptr<AsyncResp>& asyncResp)
+                       const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp](const boost::system::error_code ec) {
@@ -819,10 +819,10 @@
  *
  * @return None
  */
-inline void deleteAndCreateIPv6(const std::string& ifaceId,
-                                const std::string& id, uint8_t prefixLength,
-                                const std::string& address,
-                                const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    deleteAndCreateIPv6(const std::string& ifaceId, const std::string& id,
+                        uint8_t prefixLength, const std::string& address,
+                        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp, ifaceId, address,
@@ -861,7 +861,7 @@
  */
 inline void createIPv6(const std::string& ifaceId, uint8_t prefixLength,
                        const std::string& address,
-                       const std::shared_ptr<AsyncResp>& asyncResp)
+                       const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     auto createIpHandler = [asyncResp](const boost::system::error_code ec) {
         if (ec)
@@ -1007,17 +1007,18 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#EthernetInterfaceCollection.EthernetInterfaceCollection";
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Managers/bmc/EthernetInterfaces";
-        res.jsonValue["Name"] = "Ethernet Network Interface Collection";
-        res.jsonValue["Description"] =
+        asyncResp->res.jsonValue["Name"] =
+            "Ethernet Network Interface Collection";
+        asyncResp->res.jsonValue["Description"] =
             "Collection of EthernetInterfaces for this Manager";
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         // Get eth interface list, and call the below callback for JSON
         // preparation
         getEthernetIfaceList(
@@ -1077,8 +1078,9 @@
     }
 
   private:
-    void handleHostnamePatch(const std::string& hostname,
-                             const std::shared_ptr<AsyncResp>& asyncResp)
+    void
+        handleHostnamePatch(const std::string& hostname,
+                            const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         // SHOULD handle host names of up to 255 characters(RFC 1123)
         if (hostname.length() > 255)
@@ -1101,9 +1103,9 @@
             std::variant<std::string>(hostname));
     }
 
-    void handleDomainnamePatch(const std::string& ifaceId,
-                               const std::string& domainname,
-                               const std::shared_ptr<AsyncResp>& asyncResp)
+    void handleDomainnamePatch(
+        const std::string& ifaceId, const std::string& domainname,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         std::vector<std::string> vectorDomainname = {domainname};
         crow::connections::systemBus->async_method_call(
@@ -1121,7 +1123,7 @@
     }
 
     void handleFqdnPatch(const std::string& ifaceId, const std::string& fqdn,
-                         const std::shared_ptr<AsyncResp>& asyncResp)
+                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         // Total length of FQDN must not exceed 255 characters(RFC 1035)
         if (fqdn.length() > 255)
@@ -1179,9 +1181,9 @@
         return std::regex_match(domainname, pattern);
     }
 
-    void handleMACAddressPatch(const std::string& ifaceId,
-                               const std::string& macAddress,
-                               const std::shared_ptr<AsyncResp>& asyncResp)
+    void handleMACAddressPatch(
+        const std::string& ifaceId, const std::string& macAddress,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp, macAddress](const boost::system::error_code ec) {
@@ -1201,7 +1203,7 @@
     void setDHCPEnabled(const std::string& ifaceId,
                         const std::string& propertyName, const bool v4Value,
                         const bool v6Value,
-                        const std::shared_ptr<AsyncResp>& asyncResp)
+                        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         const std::string dhcp = getDhcpEnabledEnumeration(v4Value, v6Value);
         crow::connections::systemBus->async_method_call(
@@ -1223,7 +1225,7 @@
 
     void setEthernetInterfaceBoolProperty(
         const std::string& ifaceId, const std::string& propertyName,
-        const bool& value, const std::shared_ptr<AsyncResp>& asyncResp)
+        const bool& value, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec) {
@@ -1242,7 +1244,7 @@
     }
 
     void setDHCPv4Config(const std::string& propertyName, const bool& value,
-                         const std::shared_ptr<AsyncResp>& asyncResp)
+                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         BMCWEB_LOG_DEBUG << propertyName << " = " << value;
         crow::connections::systemBus->async_method_call(
@@ -1265,7 +1267,7 @@
                          const EthernetInterfaceData& ethData,
                          const DHCPParameters& v4dhcpParms,
                          const DHCPParameters& v6dhcpParms,
-                         const std::shared_ptr<AsyncResp>& asyncResp)
+                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         bool ipv4Active = translateDHCPEnabledToBool(ethData.DHCPEnabled, true);
         bool ipv6Active =
@@ -1400,7 +1402,7 @@
     void handleIPv4StaticPatch(
         const std::string& ifaceId, nlohmann::json& input,
         const boost::container::flat_set<IPv4AddressData>& ipv4Data,
-        const std::shared_ptr<AsyncResp>& asyncResp)
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         if ((!input.is_array()) || input.empty())
         {
@@ -1583,7 +1585,7 @@
     void handleStaticNameServersPatch(
         const std::string& ifaceId,
         const std::vector<std::string>& updatedStaticNameServers,
-        const std::shared_ptr<AsyncResp>& asyncResp)
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec) {
@@ -1604,7 +1606,7 @@
     void handleIPv6StaticAddressesPatch(
         const std::string& ifaceId, const nlohmann::json& input,
         const boost::container::flat_set<IPv6AddressData>& ipv6Data,
-        const std::shared_ptr<AsyncResp>& asyncResp)
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         if (!input.is_array() || input.empty())
         {
@@ -1725,8 +1727,8 @@
     }
 
     void parseInterfaceData(
-        const std::shared_ptr<AsyncResp>& asyncResp, const std::string& ifaceId,
-        const EthernetInterfaceData& ethData,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+        const std::string& ifaceId, const EthernetInterfaceData& ethData,
         const boost::container::flat_set<IPv4AddressData>& ipv4Data,
         const boost::container::flat_set<IPv6AddressData>& ipv6Data)
     {
@@ -1868,10 +1870,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1904,10 +1906,11 @@
             });
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1930,7 +1933,7 @@
         DHCPParameters v6dhcpParms;
 
         if (!json_util::readJson(
-                req, res, "HostName", hostname, "FQDN", fqdn,
+                req, asyncResp->res, "HostName", hostname, "FQDN", fqdn,
                 "IPv4StaticAddresses", ipv4StaticAddresses, "MACAddress",
                 macAddress, "StaticNameServers", staticNameServers,
                 "IPv6DefaultGateway", ipv6DefaultGateway, "IPv6StaticAddresses",
@@ -1941,7 +1944,7 @@
         }
         if (dhcpv4)
         {
-            if (!json_util::readJson(*dhcpv4, res, "DHCPEnabled",
+            if (!json_util::readJson(*dhcpv4, asyncResp->res, "DHCPEnabled",
                                      v4dhcpParms.dhcpv4Enabled, "UseDNSServers",
                                      v4dhcpParms.useDNSServers, "UseNTPServers",
                                      v4dhcpParms.useNTPServers, "UseDomainName",
@@ -1953,7 +1956,7 @@
 
         if (dhcpv6)
         {
-            if (!json_util::readJson(*dhcpv6, res, "OperatingMode",
+            if (!json_util::readJson(*dhcpv6, asyncResp->res, "OperatingMode",
                                      v6dhcpParms.dhcpv6OperatingMode,
                                      "UseDNSServers", v6dhcpParms.useDNSServers,
                                      "UseNTPServers", v6dhcpParms.useNTPServers,
@@ -2108,26 +2111,25 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         // TODO(Pawel) this shall be parameterized call (two params) to get
         // EthernetInterfaces for any Manager, not only hardcoded 'openbmc'.
         // Check if there is required param, truly entering this shall be
         // impossible.
         if (params.size() != 2)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
 
         const std::string& parentIfaceId = params[0];
         const std::string& ifaceId = params[1];
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#VLanNetworkInterface.v1_1_0.VLanNetworkInterface";
-        res.jsonValue["Name"] = "VLAN Network Interface";
+        asyncResp->res.jsonValue["Name"] = "VLAN Network Interface";
 
         if (!verifyNames(parentIfaceId, ifaceId))
         {
@@ -2159,10 +2161,11 @@
             });
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 2)
         {
             messages::internalError(asyncResp->res);
@@ -2182,8 +2185,8 @@
         bool vlanEnable = false;
         uint32_t vlanId = 0;
 
-        if (!json_util::readJson(req, res, "VLANEnable", vlanEnable, "VLANId",
-                                 vlanId))
+        if (!json_util::readJson(req, asyncResp->res, "VLANEnable", vlanEnable,
+                                 "VLANId", vlanId))
         {
             return;
         }
@@ -2238,10 +2241,10 @@
             });
     }
 
-    void doDelete(crow::Response& res, const crow::Request&,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request&,
                   const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 2)
         {
             messages::internalError(asyncResp->res);
@@ -2317,10 +2320,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             // This means there is a problem with the router
@@ -2380,10 +2383,10 @@
             });
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -2391,8 +2394,8 @@
         }
         bool vlanEnable = false;
         uint32_t vlanId = 0;
-        if (!json_util::readJson(req, res, "VLANId", vlanId, "VLANEnable",
-                                 vlanEnable))
+        if (!json_util::readJson(req, asyncResp->res, "VLANId", vlanId,
+                                 "VLANEnable", vlanEnable))
         {
             return;
         }
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index be6f04d..ad567ef 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -51,11 +51,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-        res.jsonValue = {
+
+        asyncResp->res.jsonValue = {
             {"@odata.type", "#EventService.v1_5_0.EventService"},
             {"Id", "EventService"},
             {"Name", "Event Service"},
@@ -89,18 +89,19 @@
             supportedSSEFilters;
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         std::optional<bool> serviceEnabled;
         std::optional<uint32_t> retryAttemps;
         std::optional<uint32_t> retryInterval;
 
-        if (!json_util::readJson(req, res, "ServiceEnabled", serviceEnabled,
-                                 "DeliveryRetryAttempts", retryAttemps,
-                                 "DeliveryRetryIntervalSeconds", retryInterval))
+        if (!json_util::readJson(req, asyncResp->res, "ServiceEnabled",
+                                 serviceEnabled, "DeliveryRetryAttempts",
+                                 retryAttemps, "DeliveryRetryIntervalSeconds",
+                                 retryInterval))
         {
             return;
         }
@@ -165,12 +166,11 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
         EventServiceManager::getInstance().sendTestEventLog();
-        res.result(boost::beast::http::status::no_content);
-        res.end();
+        asyncResp->res.result(boost::beast::http::status::no_content);
     }
 };
 
@@ -190,12 +190,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.type",
              "#EventDestinationCollection.EventDestinationCollection"},
             {"@odata.id", "/redfish/v1/EventService/Subscriptions"},
@@ -216,10 +215,10 @@
         }
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (EventServiceManager::getInstance().getNumberOfSubscriptions() >=
             maxNoOfSubscriptions)
@@ -240,7 +239,7 @@
         std::optional<std::vector<nlohmann::json>> mrdJsonArray;
 
         if (!json_util::readJson(
-                req, res, "Destination", destUrl, "Context", context,
+                req, asyncResp->res, "Destination", destUrl, "Context", context,
                 "Protocol", protocol, "SubscriptionType", subscriptionType,
                 "EventFormatType", eventFormatType2, "HttpHeaders", headers,
                 "RegistryPrefixes", regPrefixes, "MessageIds", msgIds,
@@ -474,10 +473,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -488,13 +488,12 @@
             EventServiceManager::getInstance().getSubscription(params[0]);
         if (subValue == nullptr)
         {
-            res.result(boost::beast::http::status::not_found);
-            res.end();
+            asyncResp->res.result(boost::beast::http::status::not_found);
             return;
         }
         const std::string& id = params[0];
 
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.type", "#EventDestination.v1_7_0.EventDestination"},
             {"Protocol", "Redfish"}};
         asyncResp->res.jsonValue["@odata.id"] =
@@ -522,10 +521,11 @@
         asyncResp->res.jsonValue["MetricReportDefinitions"] = mrdJsonArray;
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -536,8 +536,7 @@
             EventServiceManager::getInstance().getSubscription(params[0]);
         if (subValue == nullptr)
         {
-            res.result(boost::beast::http::status::not_found);
-            res.end();
+            asyncResp->res.result(boost::beast::http::status::not_found);
             return;
         }
 
@@ -545,7 +544,7 @@
         std::optional<std::string> retryPolicy;
         std::optional<std::vector<nlohmann::json>> headers;
 
-        if (!json_util::readJson(req, res, "Context", context,
+        if (!json_util::readJson(req, asyncResp->res, "Context", context,
                                  "DeliveryRetryPolicy", retryPolicy,
                                  "HttpHeaders", headers))
         {
@@ -579,10 +578,10 @@
         EventServiceManager::getInstance().updateSubscriptionData();
     }
 
-    void doDelete(crow::Response& res, const crow::Request&,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request&,
                   const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (params.size() != 1)
         {
@@ -592,8 +591,7 @@
 
         if (!EventServiceManager::getInstance().isSubscriptionExist(params[0]))
         {
-            res.result(boost::beast::http::status::not_found);
-            res.end();
+            asyncResp->res.result(boost::beast::http::status::not_found);
             return;
         }
         EventServiceManager::getInstance().deleteSubscription(params[0]);
diff --git a/redfish-core/lib/health.hpp b/redfish-core/lib/health.hpp
index 19175e7..cd4faa4 100644
--- a/redfish-core/lib/health.hpp
+++ b/redfish-core/lib/health.hpp
@@ -28,11 +28,11 @@
 
 struct HealthPopulate : std::enable_shared_from_this<HealthPopulate>
 {
-    HealthPopulate(const std::shared_ptr<AsyncResp>& asyncRespIn) :
+    HealthPopulate(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn) :
         asyncResp(asyncRespIn), jsonStatus(asyncResp->res.jsonValue["Status"])
     {}
 
-    HealthPopulate(const std::shared_ptr<AsyncResp>& asyncRespIn,
+    HealthPopulate(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn,
                    nlohmann::json& status) :
         asyncResp(asyncRespIn),
         jsonStatus(status)
@@ -214,7 +214,7 @@
             "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
     }
 
-    std::shared_ptr<AsyncResp> asyncResp;
+    std::shared_ptr<bmcweb::AsyncResp> asyncResp;
     nlohmann::json& jsonStatus;
 
     // we store pointers to other HealthPopulate items so we can update their
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index e320e36..4a3a205 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -24,7 +24,7 @@
  *
  * @return None.
  */
-inline void getHypervisorState(const std::shared_ptr<AsyncResp>& aResp)
+inline void getHypervisorState(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get hypervisor state information.";
     crow::connections::systemBus->async_method_call(
@@ -103,7 +103,8 @@
  *
  * @return None.
  */
-inline void getHypervisorActions(const std::shared_ptr<AsyncResp>& aResp)
+inline void
+    getHypervisorActions(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get hypervisor actions.";
     crow::connections::systemBus->async_method_call(
@@ -169,10 +170,9 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec,
                         const std::variant<std::string>& /*hostName*/) {
@@ -227,10 +227,9 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         const std::array<const char*, 1> interfaces = {
             "xyz.openbmc_project.Network.EthernetInterface"};
 
@@ -474,9 +473,10 @@
  *
  * @return None.
  */
-inline void setHypervisorIPv4Address(const std::shared_ptr<AsyncResp>& aResp,
-                                     const std::string& ethIfaceId,
-                                     const std::string& ipv4Address)
+inline void
+    setHypervisorIPv4Address(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                             const std::string& ethIfaceId,
+                             const std::string& ipv4Address)
 {
     BMCWEB_LOG_DEBUG << "Setting the Hypervisor IPaddress : " << ipv4Address
                      << " on Iface: " << ethIfaceId;
@@ -505,9 +505,9 @@
  *
  * @return None.
  */
-inline void setHypervisorIPv4Subnet(const std::shared_ptr<AsyncResp>& aResp,
-                                    const std::string& ethIfaceId,
-                                    const uint8_t subnet)
+inline void
+    setHypervisorIPv4Subnet(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                            const std::string& ethIfaceId, const uint8_t subnet)
 {
     BMCWEB_LOG_DEBUG << "Setting the Hypervisor subnet : " << subnet
                      << " on Iface: " << ethIfaceId;
@@ -537,8 +537,9 @@
  *
  * @return None.
  */
-inline void setHypervisorIPv4Gateway(const std::shared_ptr<AsyncResp>& aResp,
-                                     const std::string& gateway)
+inline void
+    setHypervisorIPv4Gateway(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                             const std::string& gateway)
 {
     BMCWEB_LOG_DEBUG
         << "Setting the DefaultGateway to the last configured gateway";
@@ -570,11 +571,10 @@
  *
  * @return None
  */
-inline void createHypervisorIPv4(const std::string& ifaceId,
-                                 uint8_t prefixLength,
-                                 const std::string& gateway,
-                                 const std::string& address,
-                                 const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    createHypervisorIPv4(const std::string& ifaceId, uint8_t prefixLength,
+                         const std::string& gateway, const std::string& address,
+                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     setHypervisorIPv4Address(asyncResp, ifaceId, address);
     setHypervisorIPv4Gateway(asyncResp, gateway);
@@ -589,8 +589,9 @@
  *
  * @return None
  */
-inline void deleteHypervisorIPv4(const std::string& ifaceId,
-                                 const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    deleteHypervisorIPv4(const std::string& ifaceId,
+                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     std::string address = "0.0.0.0";
     std::string gateway = "0.0.0.0";
@@ -662,7 +663,7 @@
 
     void handleHypervisorIPv4StaticPatch(
         const std::string& ifaceId, const nlohmann::json& input,
-        const std::shared_ptr<AsyncResp>& asyncResp)
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         if ((!input.is_array()) || input.empty())
         {
@@ -784,8 +785,9 @@
         return std::regex_match(hostName, pattern);
     }
 
-    void handleHostnamePatch(const std::string& hostName,
-                             const std::shared_ptr<AsyncResp>& asyncResp)
+    void
+        handleHostnamePatch(const std::string& hostName,
+                            const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         if (!isHostnameValid(hostName))
         {
@@ -809,9 +811,9 @@
             std::variant<std::string>(hostName));
     }
 
-    void setIPv4InterfaceEnabled(const std::string& ifaceId,
-                                 const bool& isActive,
-                                 const std::shared_ptr<AsyncResp>& asyncResp)
+    void setIPv4InterfaceEnabled(
+        const std::string& ifaceId, const bool& isActive,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec) {
@@ -831,7 +833,7 @@
     }
 
     void setDHCPEnabled(const std::string& ifaceId, const bool& ipv4DHCPEnabled,
-                        const std::shared_ptr<AsyncResp>& asyncResp)
+                        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         const std::string dhcp =
             getDhcpEnabledEnumeration(ipv4DHCPEnabled, false);
@@ -885,10 +887,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -917,10 +919,11 @@
             });
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -934,7 +937,7 @@
         std::optional<nlohmann::json> dhcpv4;
         std::optional<bool> ipv4DHCPEnabled;
 
-        if (!json_util::readJson(req, res, "HostName", hostName,
+        if (!json_util::readJson(req, asyncResp->res, "HostName", hostName,
                                  "IPv4StaticAddresses", ipv4StaticAddresses,
                                  "IPv4Addresses", ipv4Addresses, "DHCPv4",
                                  dhcpv4))
@@ -949,7 +952,7 @@
 
         if (dhcpv4)
         {
-            if (!json_util::readJson(*dhcpv4, res, "DHCPEnabled",
+            if (!json_util::readJson(*dhcpv4, asyncResp->res, "DHCPEnabled",
                                      ipv4DHCPEnabled))
             {
                 return;
@@ -1030,7 +1033,7 @@
                 // updated settings from the user.
                 setIPv4InterfaceEnabled(ifaceId, false, asyncResp);
             });
-        res.result(boost::beast::http::status::accepted);
+        asyncResp->res.result(boost::beast::http::status::accepted);
     }
 };
 
@@ -1060,11 +1063,9 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-
         // Only return action info if hypervisor D-Bus object present
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec,
@@ -1136,13 +1137,13 @@
      * Function handles POST method request.
      * Analyzes POST body message before sends Reset request data to D-Bus.
      */
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         std::optional<std::string> resetType;
-        if (!json_util::readJson(req, res, "ResetType", resetType))
+        if (!json_util::readJson(req, asyncResp->res, "ResetType", resetType))
         {
             // readJson adds appropriate error to response
             return;
diff --git a/redfish-core/lib/led.hpp b/redfish-core/lib/led.hpp
index c003d22..fe1842f 100644
--- a/redfish-core/lib/led.hpp
+++ b/redfish-core/lib/led.hpp
@@ -31,7 +31,8 @@
  * @return None.
  */
 // TODO (Gunnar): Remove IndicatorLED after enough time has passed
-inline void getIndicatorLedState(const std::shared_ptr<AsyncResp>& aResp)
+inline void
+    getIndicatorLedState(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get led groups";
     crow::connections::systemBus->async_method_call(
@@ -100,8 +101,9 @@
  * @return None.
  */
 // TODO (Gunnar): Remove IndicatorLED after enough time has passed
-inline void setIndicatorLedState(const std::shared_ptr<AsyncResp>& aResp,
-                                 const std::string& ledState)
+inline void
+    setIndicatorLedState(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                         const std::string& ledState)
 {
     BMCWEB_LOG_DEBUG << "Set led groups";
     bool ledOn = false;
@@ -163,7 +165,8 @@
  *
  * @return None.
  */
-inline void getLocationIndicatorActive(const std::shared_ptr<AsyncResp>& aResp)
+inline void
+    getLocationIndicatorActive(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get LocationIndicatorActive";
     crow::connections::systemBus->async_method_call(
@@ -233,8 +236,9 @@
  *
  * @return None.
  */
-inline void setLocationIndicatorActive(const std::shared_ptr<AsyncResp>& aResp,
-                                       const bool ledState)
+inline void
+    setLocationIndicatorActive(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                               const bool ledState)
 {
     BMCWEB_LOG_DEBUG << "Set LocationIndicatorActive";
 
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 7614ec0..d229c48 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -181,8 +181,8 @@
     return true;
 }
 
-static bool getSkipParam(crow::Response& res, const crow::Request& req,
-                         uint64_t& skip)
+static bool getSkipParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                         const crow::Request& req, uint64_t& skip)
 {
     boost::urls::url_view::params_type::iterator it =
         req.urlParams.find("$skip");
@@ -194,8 +194,8 @@
         if (skipParam.empty() || *ptr != '\0')
         {
 
-            messages::queryParameterValueTypeError(res, std::string(skipParam),
-                                                   "$skip");
+            messages::queryParameterValueTypeError(
+                asyncResp->res, std::string(skipParam), "$skip");
             return false;
         }
     }
@@ -203,8 +203,8 @@
 }
 
 static constexpr const uint64_t maxEntriesPerPage = 1000;
-static bool getTopParam(crow::Response& res, const crow::Request& req,
-                        uint64_t& top)
+static bool getTopParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                        const crow::Request& req, uint64_t& top)
 {
     boost::urls::url_view::params_type::iterator it =
         req.urlParams.find("$top");
@@ -215,15 +215,15 @@
         top = std::strtoul(topParam.c_str(), &ptr, 10);
         if (topParam.empty() || *ptr != '\0')
         {
-            messages::queryParameterValueTypeError(res, std::string(topParam),
-                                                   "$top");
+            messages::queryParameterValueTypeError(
+                asyncResp->res, std::string(topParam), "$top");
             return false;
         }
         if (top < 1U || top > maxEntriesPerPage)
         {
 
             messages::queryParameterOutOfRange(
-                res, std::to_string(top), "$top",
+                asyncResp->res, std::to_string(top), "$top",
                 "1-" + std::to_string(maxEntriesPerPage));
             return false;
         }
@@ -311,8 +311,10 @@
     return true;
 }
 
-static bool getTimestampFromID(crow::Response& res, const std::string& entryID,
-                               uint64_t& timestamp, uint64_t& index)
+static bool
+    getTimestampFromID(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                       const std::string& entryID, uint64_t& timestamp,
+                       uint64_t& index)
 {
     if (entryID.empty())
     {
@@ -335,17 +337,17 @@
         }
         catch (std::invalid_argument&)
         {
-            messages::resourceMissingAtURI(res, entryID);
+            messages::resourceMissingAtURI(asyncResp->res, entryID);
             return false;
         }
         catch (std::out_of_range&)
         {
-            messages::resourceMissingAtURI(res, entryID);
+            messages::resourceMissingAtURI(asyncResp->res, entryID);
             return false;
         }
         if (pos != indexStr.size())
         {
-            messages::resourceMissingAtURI(res, entryID);
+            messages::resourceMissingAtURI(asyncResp->res, entryID);
             return false;
         }
     }
@@ -357,17 +359,17 @@
     }
     catch (std::invalid_argument&)
     {
-        messages::resourceMissingAtURI(res, entryID);
+        messages::resourceMissingAtURI(asyncResp->res, entryID);
         return false;
     }
     catch (std::out_of_range&)
     {
-        messages::resourceMissingAtURI(res, entryID);
+        messages::resourceMissingAtURI(asyncResp->res, entryID);
         return false;
     }
     if (pos != tsStr.size())
     {
-        messages::resourceMissingAtURI(res, entryID);
+        messages::resourceMissingAtURI(asyncResp->res, entryID);
         return false;
     }
     return true;
@@ -398,8 +400,9 @@
     return !redfishLogFiles.empty();
 }
 
-inline void getDumpEntryCollection(std::shared_ptr<AsyncResp>& asyncResp,
-                                   const std::string& dumpType)
+inline void
+    getDumpEntryCollection(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                           const std::string& dumpType)
 {
     std::string dumpPath;
     if (dumpType == "BMC")
@@ -529,9 +532,9 @@
         "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
 }
 
-inline void getDumpEntryById(std::shared_ptr<AsyncResp>& asyncResp,
-                             const std::string& entryID,
-                             const std::string& dumpType)
+inline void
+    getDumpEntryById(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                     const std::string& entryID, const std::string& dumpType)
 {
     std::string dumpPath;
     if (dumpType == "BMC")
@@ -659,7 +662,7 @@
         "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
 }
 
-inline void deleteDumpEntry(const std::shared_ptr<AsyncResp>& asyncResp,
+inline void deleteDumpEntry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                             const std::string& entryID,
                             const std::string& dumpType)
 {
@@ -687,11 +690,11 @@
         "xyz.openbmc_project.Object.Delete", "Delete");
 }
 
-inline void createDumpTaskCallback(const crow::Request& req,
-                                   const std::shared_ptr<AsyncResp>& asyncResp,
-                                   const uint32_t& dumpId,
-                                   const std::string& dumpPath,
-                                   const std::string& dumpType)
+inline void
+    createDumpTaskCallback(const crow::Request& req,
+                           const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                           const uint32_t& dumpId, const std::string& dumpPath,
+                           const std::string& dumpType)
 {
     std::shared_ptr<task::TaskData> task = task::TaskData::createTask(
         [dumpId, dumpPath, dumpType](
@@ -740,10 +743,9 @@
     task->payload.emplace(req);
 }
 
-inline void createDump(crow::Response& res, const crow::Request& req,
-                       const std::string& dumpType)
+inline void createDump(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                       const crow::Request& req, const std::string& dumpType)
 {
-    std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
     std::string dumpPath;
     if (dumpType == "BMC")
@@ -831,11 +833,12 @@
         "xyz.openbmc_project.Dump.Create", "CreateDump");
 }
 
-inline void clearDump(crow::Response& res, const std::string& dumpType)
+inline void clearDump(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                      const std::string& dumpType)
 {
     std::string dumpTypeLowerCopy =
         std::string(boost::algorithm::to_lower_copy(dumpType));
-    std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
     crow::connections::systemBus->async_method_call(
         [asyncResp, dumpType](const boost::system::error_code ec,
                               const std::vector<std::string>& subTreePaths) {
@@ -921,10 +924,9 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         // Collections don't include the static data added by SubRoute because
         // it has a duplicate entry for members
         asyncResp->res.jsonValue["@odata.type"] =
@@ -998,11 +1000,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-
         asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Systems/system/LogServices/EventLog";
         asyncResp->res.jsonValue["@odata.type"] =
@@ -1038,10 +1038,9 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         // Clear the EventLog by deleting the log files
         std::vector<std::filesystem::path> redfishLogFiles;
@@ -1185,17 +1184,17 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         uint64_t skip = 0;
         uint64_t top = maxEntriesPerPage; // Show max entries by default
-        if (!getSkipParam(asyncResp->res, req, skip))
+        if (!getSkipParam(asyncResp, req, skip))
         {
             return;
         }
-        if (!getTopParam(asyncResp->res, req, top))
+        if (!getTopParam(asyncResp, req, top))
         {
             return;
         }
@@ -1288,10 +1287,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1363,10 +1363,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         // Collections don't include the static data added by SubRoute because
         // it has a duplicate entry for members
@@ -1544,10 +1543,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1668,10 +1668,10 @@
             "org.freedesktop.DBus.Properties", "GetAll", "");
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         if (params.size() != 1)
         {
@@ -1682,7 +1682,7 @@
 
         std::optional<bool> resolved;
 
-        if (!json_util::readJson(req, res, "Resolved", resolved))
+        if (!json_util::readJson(req, asyncResp->res, "Resolved", resolved))
         {
             return;
         }
@@ -1709,14 +1709,13 @@
         }
     }
 
-    void doDelete(crow::Response& res, const crow::Request&,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request&,
                   const std::vector<std::string>& params) override
     {
 
         BMCWEB_LOG_DEBUG << "Do delete single event entries.";
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1777,10 +1776,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -1902,10 +1901,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         // Collections don't include the static data added by SubRoute because
         // it has a duplicate entry for members
         asyncResp->res.jsonValue["@odata.type"] =
@@ -1946,10 +1945,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         asyncResp->res.jsonValue["@odata.type"] =
             "#LogService.v1_1_0.LogService";
         asyncResp->res.jsonValue["@odata.id"] =
@@ -2041,18 +2040,19 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         static constexpr const long maxEntriesPerPage = 1000;
         uint64_t skip = 0;
         uint64_t top = maxEntriesPerPage; // Show max entries by default
-        if (!getSkipParam(asyncResp->res, req, skip))
+        if (!getSkipParam(asyncResp, req, skip))
         {
             return;
         }
-        if (!getTopParam(asyncResp->res, req, top))
+        if (!getTopParam(asyncResp, req, top))
         {
             return;
         }
@@ -2145,10 +2145,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -2158,7 +2159,7 @@
         // Convert the unique ID back to a timestamp to find the entry
         uint64_t ts = 0;
         uint64_t index = 0;
-        if (!getTimestampFromID(asyncResp->res, entryID, ts, index))
+        if (!getTimestampFromID(asyncResp, entryID, ts, index))
         {
             return;
         }
@@ -2231,10 +2232,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Managers/bmc/LogServices/Dump";
@@ -2275,10 +2275,9 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         asyncResp->res.jsonValue["@odata.type"] =
             "#LogEntryCollection.LogEntryCollection";
@@ -2309,10 +2308,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -2321,10 +2321,11 @@
         getDumpEntryById(asyncResp, params[0], "BMC");
     }
 
-    void doDelete(crow::Response& res, const crow::Request&,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request&,
                   const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -2352,10 +2353,11 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        createDump(res, req, "BMC");
+        createDump(asyncResp, req, "BMC");
     }
 };
 
@@ -2377,10 +2379,10 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
-        clearDump(res, "BMC");
+        clearDump(asyncResp, "BMC");
     }
 };
 
@@ -2400,10 +2402,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Systems/system/LogServices/Dump";
@@ -2445,10 +2446,9 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         asyncResp->res.jsonValue["@odata.type"] =
             "#LogEntryCollection.LogEntryCollection";
@@ -2479,10 +2479,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -2491,10 +2492,11 @@
         getDumpEntryById(asyncResp, params[0], "System");
     }
 
-    void doDelete(crow::Response& res, const crow::Request&,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request&,
                   const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -2522,10 +2524,11 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        createDump(res, req, "System");
+        createDump(asyncResp, req, "System");
     }
 };
 
@@ -2547,10 +2550,10 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
-        clearDump(res, "System");
+        clearDump(asyncResp, "System");
     }
 };
 
@@ -2575,10 +2578,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         // Copy over the static data to include the entries added by SubRoute
         asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Systems/system/LogServices/Crashdump";
@@ -2621,10 +2624,9 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec,
@@ -2640,9 +2642,9 @@
     }
 };
 
-static void logCrashdumpEntry(const std::shared_ptr<AsyncResp>& asyncResp,
-                              const std::string& logID,
-                              nlohmann::json& logEntryJson)
+static void
+    logCrashdumpEntry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                      const std::string& logID, nlohmann::json& logEntryJson)
 {
     auto getStoredLogCallback =
         [asyncResp, logID, &logEntryJson](
@@ -2717,10 +2719,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         // Collections don't include the static data added by SubRoute because
         // it has a duplicate entry for members
         auto getLogEntriesCallback = [asyncResp](
@@ -2801,10 +2803,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -2836,10 +2839,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 2)
         {
             messages::internalError(asyncResp->res);
@@ -2937,10 +2941,10 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         std::string diagnosticDataType;
         std::string oemDiagnosticDataType;
@@ -3053,12 +3057,11 @@
      * The Clear Log actions does not require any parameter.The action deletes
      * all entries found in the Entries collection for this Log Service.
      */
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "Do delete all entries.";
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         // Process response from Logging service.
         auto respHandler = [asyncResp](const boost::system::error_code ec) {
             BMCWEB_LOG_DEBUG << "doClearLog resp_handler callback: Done";
@@ -3102,10 +3105,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         asyncResp->res.jsonValue = {
             {"@odata.id", "/redfish/v1/Systems/system/LogServices/PostCodes"},
@@ -3140,12 +3142,11 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request&,
-                const std::vector<std::string>&) override
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request&, const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "Do delete all postcodes entries.";
 
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         // Make call to post-code service to request clear all
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec) {
@@ -3167,7 +3168,7 @@
 };
 
 static void fillPostCodeEntry(
-    const std::shared_ptr<AsyncResp>& aResp,
+    const std::shared_ptr<bmcweb::AsyncResp>& aResp,
     const boost::container::flat_map<
         uint64_t, std::tuple<uint64_t, std::vector<uint8_t>>>& postcode,
     const uint16_t bootIndex, const uint64_t codeIndex = 0,
@@ -3285,7 +3286,7 @@
     }
 }
 
-static void getPostCodeForEntry(const std::shared_ptr<AsyncResp>& aResp,
+static void getPostCodeForEntry(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                                 const uint16_t bootIndex,
                                 const uint64_t codeIndex)
 {
@@ -3319,7 +3320,7 @@
         bootIndex);
 }
 
-static void getPostCodeForBoot(const std::shared_ptr<AsyncResp>& aResp,
+static void getPostCodeForBoot(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                                const uint16_t bootIndex,
                                const uint16_t bootCount,
                                const uint64_t entryCount, const uint64_t skip,
@@ -3376,8 +3377,9 @@
         bootIndex);
 }
 
-static void getCurrentBootNumber(const std::shared_ptr<AsyncResp>& aResp,
-                                 const uint64_t skip, const uint64_t top)
+static void
+    getCurrentBootNumber(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                         const uint64_t skip, const uint64_t top)
 {
     uint64_t entryCount = 0;
     crow::connections::systemBus->async_method_call(
@@ -3422,10 +3424,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         asyncResp->res.jsonValue["@odata.type"] =
             "#LogEntryCollection.LogEntryCollection";
@@ -3439,11 +3441,11 @@
 
         uint64_t skip = 0;
         uint64_t top = maxEntriesPerPage; // Show max entries by default
-        if (!getSkipParam(asyncResp->res, req, skip))
+        if (!getSkipParam(asyncResp, req, skip))
         {
             return;
         }
-        if (!getTopParam(asyncResp->res, req, top))
+        if (!getTopParam(asyncResp, req, top))
         {
             return;
         }
@@ -3469,10 +3471,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index ea0589e..c41c73e 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -38,7 +38,8 @@
  *
  * @param[in] asyncResp - Shared pointer for completing asynchronous calls
  */
-inline void doBMCGracefulRestart(const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    doBMCGracefulRestart(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     const char* processName = "xyz.openbmc_project.State.BMC";
     const char* objectPath = "/xyz/openbmc_project/state/bmc0";
@@ -66,7 +67,8 @@
         interfaceName, destProperty, dbusPropertyValue);
 }
 
-inline void doBMCForceRestart(const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    doBMCForceRestart(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     const char* processName = "xyz.openbmc_project.State.BMC";
     const char* objectPath = "/xyz/openbmc_project/state/bmc0";
@@ -114,13 +116,13 @@
      * Analyzes POST body before sending Reset (Reboot) request data to D-Bus.
      * OpenBMC supports ResetType "GracefulRestart" and "ForceRestart".
      */
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "Post Manager Reset.";
 
         std::string resetType;
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (!json_util::readJson(req, asyncResp->res, "ResetType", resetType))
         {
@@ -174,13 +176,13 @@
      *
      * OpenBMC only supports ResetToDefaultsType "ResetAll".
      */
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "Post ResetToDefaults.";
 
         std::string resetType;
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (!json_util::readJson(req, asyncResp->res, "ResetToDefaultsType",
                                  resetType))
@@ -246,10 +248,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.type", "#ActionInfo.v1_1_2.ActionInfo"},
             {"@odata.id", "/redfish/v1/Managers/bmc/ResetActionInfo"},
             {"Name", "Reset Action Info"},
@@ -259,7 +261,6 @@
                {"Required", true},
                {"DataType", "String"},
                {"AllowableValues", {"GracefulRestart", "ForceRestart"}}}}}};
-        res.end();
     }
 };
 
@@ -274,11 +275,11 @@
 static constexpr const char* thermalModeIface =
     "xyz.openbmc_project.Control.ThermalMode";
 
-inline void asyncPopulatePid(const std::string& connection,
-                             const std::string& path,
-                             const std::string& currentProfile,
-                             const std::vector<std::string>& supportedProfiles,
-                             const std::shared_ptr<AsyncResp>& asyncResp)
+inline void
+    asyncPopulatePid(const std::string& connection, const std::string& path,
+                     const std::string& currentProfile,
+                     const std::vector<std::string>& supportedProfiles,
+                     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
 
     crow::connections::systemBus->async_method_call(
@@ -691,9 +692,10 @@
     patch
 };
 
-inline bool getZonesFromJsonReq(const std::shared_ptr<AsyncResp>& response,
-                                std::vector<nlohmann::json>& config,
-                                std::vector<std::string>& zones)
+inline bool
+    getZonesFromJsonReq(const std::shared_ptr<bmcweb::AsyncResp>& response,
+                        std::vector<nlohmann::json>& config,
+                        std::vector<std::string>& zones)
 {
     if (config.empty())
     {
@@ -762,7 +764,7 @@
 }
 
 inline CreatePIDRet createPidInterface(
-    const std::shared_ptr<AsyncResp>& response, const std::string& type,
+    const std::shared_ptr<bmcweb::AsyncResp>& response, const std::string& type,
     const nlohmann::json::iterator& it, const std::string& path,
     const dbus::utility::ManagedObjectType& managedObj, bool createNewObject,
     boost::container::flat_map<std::string, dbus::utility::DbusVariantType>&
@@ -1155,7 +1157,7 @@
 struct GetPIDValues : std::enable_shared_from_this<GetPIDValues>
 {
 
-    GetPIDValues(const std::shared_ptr<AsyncResp>& asyncRespIn) :
+    GetPIDValues(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn) :
         asyncResp(asyncRespIn)
 
     {}
@@ -1325,13 +1327,13 @@
     std::vector<std::string> supportedProfiles;
     std::string currentProfile;
     crow::openbmc_mapper::GetSubTreeType subtree;
-    std::shared_ptr<AsyncResp> asyncResp;
+    std::shared_ptr<bmcweb::AsyncResp> asyncResp;
 };
 
 struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
 {
 
-    SetPIDValues(const std::shared_ptr<AsyncResp>& asyncRespIn,
+    SetPIDValues(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn,
                  nlohmann::json& data) :
         asyncResp(asyncRespIn)
     {
@@ -1494,9 +1496,7 @@
         {
             return;
         }
-
-        std::shared_ptr<AsyncResp> response = asyncResp;
-
+        std::shared_ptr<bmcweb::AsyncResp> response = asyncResp;
         if (profile)
         {
             if (std::find(supportedProfiles.begin(), supportedProfiles.end(),
@@ -1692,7 +1692,7 @@
             }
         }
     }
-    std::shared_ptr<AsyncResp> asyncResp;
+    std::shared_ptr<bmcweb::AsyncResp> asyncResp;
     std::vector<std::pair<std::string, std::optional<nlohmann::json>>>
         configuration;
     std::optional<std::string> profile;
@@ -1712,7 +1712,7 @@
  * @param[in] path - object path
  * @return none
  */
-inline void getLocation(const std::shared_ptr<AsyncResp>& aResp,
+inline void getLocation(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                         const std::string& connectionName,
                         const std::string& path)
 {
@@ -1764,37 +1764,39 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.id"] = "/redfish/v1/Managers/bmc";
-        res.jsonValue["@odata.type"] = "#Manager.v1_11_0.Manager";
-        res.jsonValue["Id"] = "bmc";
-        res.jsonValue["Name"] = "OpenBmc Manager";
-        res.jsonValue["Description"] = "Baseboard Management Controller";
-        res.jsonValue["PowerState"] = "On";
-        res.jsonValue["Status"] = {{"State", "Enabled"}, {"Health", "OK"}};
-        res.jsonValue["ManagerType"] = "BMC";
-        res.jsonValue["UUID"] = systemd_utils::getUuid();
-        res.jsonValue["ServiceEntryPointUUID"] = uuid;
-        res.jsonValue["Model"] = "OpenBmc"; // TODO(ed), get model
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Managers/bmc";
+        asyncResp->res.jsonValue["@odata.type"] = "#Manager.v1_11_0.Manager";
+        asyncResp->res.jsonValue["Id"] = "bmc";
+        asyncResp->res.jsonValue["Name"] = "OpenBmc Manager";
+        asyncResp->res.jsonValue["Description"] =
+            "Baseboard Management Controller";
+        asyncResp->res.jsonValue["PowerState"] = "On";
+        asyncResp->res.jsonValue["Status"] = {{"State", "Enabled"},
+                                              {"Health", "OK"}};
+        asyncResp->res.jsonValue["ManagerType"] = "BMC";
+        asyncResp->res.jsonValue["UUID"] = systemd_utils::getUuid();
+        asyncResp->res.jsonValue["ServiceEntryPointUUID"] = uuid;
+        asyncResp->res.jsonValue["Model"] = "OpenBmc"; // TODO(ed), get model
 
-        res.jsonValue["LogServices"] = {
+        asyncResp->res.jsonValue["LogServices"] = {
             {"@odata.id", "/redfish/v1/Managers/bmc/LogServices"}};
 
-        res.jsonValue["NetworkProtocol"] = {
+        asyncResp->res.jsonValue["NetworkProtocol"] = {
             {"@odata.id", "/redfish/v1/Managers/bmc/NetworkProtocol"}};
 
-        res.jsonValue["EthernetInterfaces"] = {
+        asyncResp->res.jsonValue["EthernetInterfaces"] = {
             {"@odata.id", "/redfish/v1/Managers/bmc/EthernetInterfaces"}};
 
 #ifdef BMCWEB_ENABLE_VM_NBDPROXY
-        res.jsonValue["VirtualMedia"] = {
+        asyncResp->res.jsonValue["VirtualMedia"] = {
             {"@odata.id", "/redfish/v1/Managers/bmc/VirtualMedia"}};
 #endif // BMCWEB_ENABLE_VM_NBDPROXY
 
         // default oem data
-        nlohmann::json& oem = res.jsonValue["Oem"];
+        nlohmann::json& oem = asyncResp->res.jsonValue["Oem"];
         nlohmann::json& oemOpenbmc = oem["OpenBmc"];
         oem["@odata.type"] = "#OemManager.Oem";
         oem["@odata.id"] = "/redfish/v1/Managers/bmc#/Oem";
@@ -1806,7 +1808,7 @@
         // Manager.Reset (an action) can be many values, OpenBMC only supports
         // BMC reboot.
         nlohmann::json& managerReset =
-            res.jsonValue["Actions"]["#Manager.Reset"];
+            asyncResp->res.jsonValue["Actions"]["#Manager.Reset"];
         managerReset["target"] =
             "/redfish/v1/Managers/bmc/Actions/Manager.Reset";
         managerReset["@Redfish.ActionInfo"] =
@@ -1816,31 +1818,31 @@
         // PreserveNetworkAndUsers and PreserveNetwork that aren't supported
         // on OpenBMC
         nlohmann::json& resetToDefaults =
-            res.jsonValue["Actions"]["#Manager.ResetToDefaults"];
+            asyncResp->res.jsonValue["Actions"]["#Manager.ResetToDefaults"];
         resetToDefaults["target"] =
             "/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults";
         resetToDefaults["ResetType@Redfish.AllowableValues"] = {"ResetAll"};
 
-        res.jsonValue["DateTime"] = crow::utility::dateTimeNow();
+        asyncResp->res.jsonValue["DateTime"] = crow::utility::dateTimeNow();
 
         // Fill in SerialConsole info
-        res.jsonValue["SerialConsole"]["ServiceEnabled"] = true;
-        res.jsonValue["SerialConsole"]["MaxConcurrentSessions"] = 15;
-        res.jsonValue["SerialConsole"]["ConnectTypesSupported"] = {"IPMI",
-                                                                   "SSH"};
+        asyncResp->res.jsonValue["SerialConsole"]["ServiceEnabled"] = true;
+        asyncResp->res.jsonValue["SerialConsole"]["MaxConcurrentSessions"] = 15;
+        asyncResp->res.jsonValue["SerialConsole"]["ConnectTypesSupported"] = {
+            "IPMI", "SSH"};
 #ifdef BMCWEB_ENABLE_KVM
         // Fill in GraphicalConsole info
-        res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
-        res.jsonValue["GraphicalConsole"]["MaxConcurrentSessions"] = 4;
-        res.jsonValue["GraphicalConsole"]["ConnectTypesSupported"] = {"KVMIP"};
+        asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
+        asyncResp->res.jsonValue["GraphicalConsole"]["MaxConcurrentSessions"] =
+            4;
+        asyncResp->res
+            .jsonValue["GraphicalConsole"]["ConnectTypesSupported"] = {"KVMIP"};
 #endif // BMCWEB_ENABLE_KVM
 
-        res.jsonValue["Links"]["ManagerForServers@odata.count"] = 1;
-        res.jsonValue["Links"]["ManagerForServers"] = {
+        asyncResp->res.jsonValue["Links"]["ManagerForServers@odata.count"] = 1;
+        asyncResp->res.jsonValue["Links"]["ManagerForServers"] = {
             {{"@odata.id", "/redfish/v1/Systems/system"}}};
 
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-
         auto health = std::make_shared<HealthPopulate>(asyncResp);
         health->isManagersHealth = true;
         health->populate();
@@ -1853,14 +1855,16 @@
         auto pids = std::make_shared<GetPIDValues>(asyncResp);
         pids->run();
 
-        getMainChassisId(asyncResp, [](const std::string& chassisId,
-                                       const std::shared_ptr<AsyncResp>& aRsp) {
-            aRsp->res.jsonValue["Links"]["ManagerForChassis@odata.count"] = 1;
-            aRsp->res.jsonValue["Links"]["ManagerForChassis"] = {
-                {{"@odata.id", "/redfish/v1/Chassis/" + chassisId}}};
-            aRsp->res.jsonValue["Links"]["ManagerInChassis"] = {
-                {"@odata.id", "/redfish/v1/Chassis/" + chassisId}};
-        });
+        getMainChassisId(
+            asyncResp, [](const std::string& chassisId,
+                          const std::shared_ptr<bmcweb::AsyncResp>& aRsp) {
+                aRsp->res.jsonValue["Links"]["ManagerForChassis@odata.count"] =
+                    1;
+                aRsp->res.jsonValue["Links"]["ManagerForChassis"] = {
+                    {{"@odata.id", "/redfish/v1/Chassis/" + chassisId}}};
+                aRsp->res.jsonValue["Links"]["ManagerInChassis"] = {
+                    {"@odata.id", "/redfish/v1/Chassis/" + chassisId}};
+            });
 
         static bool started = false;
 
@@ -1995,15 +1999,15 @@
                 "xyz.openbmc_project.Inventory.Item.Bmc"});
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>&) override
     {
         std::optional<nlohmann::json> oem;
         std::optional<nlohmann::json> links;
         std::optional<std::string> datetime;
-        std::shared_ptr<AsyncResp> response = std::make_shared<AsyncResp>(res);
 
-        if (!json_util::readJson(req, response->res, "Oem", oem, "DateTime",
+        if (!json_util::readJson(req, asyncResp->res, "Oem", oem, "DateTime",
                                  datetime, "Links", links))
         {
             return;
@@ -2012,7 +2016,8 @@
         if (oem)
         {
             std::optional<nlohmann::json> openbmc;
-            if (!redfish::json_util::readJson(*oem, res, "OpenBmc", openbmc))
+            if (!redfish::json_util::readJson(*oem, asyncResp->res, "OpenBmc",
+                                              openbmc))
             {
                 BMCWEB_LOG_ERROR
                     << "Illegal Property "
@@ -2023,7 +2028,8 @@
             if (openbmc)
             {
                 std::optional<nlohmann::json> fan;
-                if (!redfish::json_util::readJson(*openbmc, res, "Fan", fan))
+                if (!redfish::json_util::readJson(*openbmc, asyncResp->res,
+                                                  "Fan", fan))
                 {
                     BMCWEB_LOG_ERROR
                         << "Illegal Property "
@@ -2034,7 +2040,7 @@
                 }
                 if (fan)
                 {
-                    auto pid = std::make_shared<SetPIDValues>(response, *fan);
+                    auto pid = std::make_shared<SetPIDValues>(asyncResp, *fan);
                     pid->run();
                 }
             }
@@ -2042,33 +2048,34 @@
         if (links)
         {
             std::optional<nlohmann::json> activeSoftwareImage;
-            if (!redfish::json_util::readJson(
-                    *links, res, "ActiveSoftwareImage", activeSoftwareImage))
+            if (!redfish::json_util::readJson(*links, asyncResp->res,
+                                              "ActiveSoftwareImage",
+                                              activeSoftwareImage))
             {
                 return;
             }
             if (activeSoftwareImage)
             {
                 std::optional<std::string> odataId;
-                if (!json_util::readJson(*activeSoftwareImage, res, "@odata.id",
-                                         odataId))
+                if (!json_util::readJson(*activeSoftwareImage, asyncResp->res,
+                                         "@odata.id", odataId))
                 {
                     return;
                 }
 
                 if (odataId)
                 {
-                    setActiveFirmwareImage(response, *odataId);
+                    setActiveFirmwareImage(asyncResp, *odataId);
                 }
             }
         }
         if (datetime)
         {
-            setDateTime(response, std::move(*datetime));
+            setDateTime(asyncResp, std::move(*datetime));
         }
     }
 
-    void getLastResetTime(const std::shared_ptr<AsyncResp>& aResp)
+    void getLastResetTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
     {
         BMCWEB_LOG_DEBUG << "Getting Manager Last Reset Time";
 
@@ -2111,7 +2118,7 @@
      *
      * @return void
      */
-    void setActiveFirmwareImage(const std::shared_ptr<AsyncResp>& aResp,
+    void setActiveFirmwareImage(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                                 const std::string& runningFirmwareTarget)
     {
         // Get the Id from /redfish/v1/UpdateService/FirmwareInventory/<Id>
@@ -2213,7 +2220,7 @@
             "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
     }
 
-    void setDateTime(std::shared_ptr<AsyncResp> aResp,
+    void setDateTime(std::shared_ptr<bmcweb::AsyncResp> aResp,
                      std::string datetime) const
     {
         BMCWEB_LOG_DEBUG << "Set date time: " << datetime;
@@ -2282,18 +2289,18 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
         // Collections don't include the static data added by SubRoute
         // because it has a duplicate entry for members
-        res.jsonValue["@odata.id"] = "/redfish/v1/Managers";
-        res.jsonValue["@odata.type"] = "#ManagerCollection.ManagerCollection";
-        res.jsonValue["Name"] = "Manager Collection";
-        res.jsonValue["Members@odata.count"] = 1;
-        res.jsonValue["Members"] = {
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Managers";
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#ManagerCollection.ManagerCollection";
+        asyncResp->res.jsonValue["Name"] = "Manager Collection";
+        asyncResp->res.jsonValue["Members@odata.count"] = 1;
+        asyncResp->res.jsonValue["Members"] = {
             {{"@odata.id", "/redfish/v1/Managers/bmc"}}};
-        res.end();
     }
 };
 } // namespace redfish
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index f6be846..af619e0 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -136,7 +136,7 @@
     return "";
 }
 
-inline void dimmPropToHex(const std::shared_ptr<AsyncResp>& aResp,
+inline void dimmPropToHex(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                           const char* key,
                           const std::pair<std::string, DimmProperty>& property)
 {
@@ -151,9 +151,9 @@
     aResp->res.jsonValue[key] = (boost::format("0x%04x") % *value).str();
 }
 
-inline void
-    getPersistentMemoryProperties(const std::shared_ptr<AsyncResp>& aResp,
-                                  const DimmProperties& properties)
+inline void getPersistentMemoryProperties(
+    const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+    const DimmProperties& properties)
 {
     for (const auto& property : properties)
     {
@@ -436,7 +436,7 @@
     }
 }
 
-inline void getDimmDataByService(std::shared_ptr<AsyncResp> aResp,
+inline void getDimmDataByService(std::shared_ptr<bmcweb::AsyncResp> aResp,
                                  const std::string& dimmId,
                                  const std::string& service,
                                  const std::string& objPath)
@@ -716,7 +716,7 @@
         service, objPath, "org.freedesktop.DBus.Properties", "GetAll", "");
 }
 
-inline void getDimmPartitionData(std::shared_ptr<AsyncResp> aResp,
+inline void getDimmPartitionData(std::shared_ptr<bmcweb::AsyncResp> aResp,
                                  const std::string& service,
                                  const std::string& path)
 {
@@ -800,7 +800,7 @@
         "xyz.openbmc_project.Inventory.Item.PersistentMemory.Partition");
 }
 
-inline void getDimmData(std::shared_ptr<AsyncResp> aResp,
+inline void getDimmData(std::shared_ptr<bmcweb::AsyncResp> aResp,
                         const std::string& dimmId)
 {
     BMCWEB_LOG_DEBUG << "Get available system dimm resources.";
@@ -886,13 +886,14 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#MemoryCollection.MemoryCollection";
-        res.jsonValue["Name"] = "Memory Module Collection";
-        res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system/Memory";
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#MemoryCollection.MemoryCollection";
+        asyncResp->res.jsonValue["Name"] = "Memory Module Collection";
+        asyncResp->res.jsonValue["@odata.id"] =
+            "/redfish/v1/Systems/system/Memory";
 
         collection_util::getCollectionMembers(
             asyncResp, "/redfish/v1/Systems/system/Memory",
@@ -922,23 +923,22 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         // Check if there is required param, truly entering this shall be
         // impossible
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
         const std::string& dimmId = params[0];
 
-        res.jsonValue["@odata.type"] = "#Memory.v1_11_0.Memory";
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["@odata.type"] = "#Memory.v1_11_0.Memory";
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Systems/system/Memory/" + dimmId;
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         getDimmData(asyncResp, dimmId);
     }
diff --git a/redfish-core/lib/message_registries.hpp b/redfish-core/lib/message_registries.hpp
index 77fc10e..455bf70 100644
--- a/redfish-core/lib/message_registries.hpp
+++ b/redfish-core/lib/message_registries.hpp
@@ -44,13 +44,13 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
         // Collections don't include the static data added by SubRoute because
         // it has a duplicate entry for members
 
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.type",
              "#MessageRegistryFileCollection.MessageRegistryFileCollection"},
             {"@odata.id", "/redfish/v1/Registries"},
@@ -62,8 +62,6 @@
               {{"@odata.id", "/redfish/v1/Registries/TaskEvent"}},
               {{"@odata.id", "/redfish/v1/Registries/ResourceEvent"}},
               {{"@odata.id", "/redfish/v1/Registries/OpenBMC"}}}}};
-
-        res.end();
     }
 };
 
@@ -83,13 +81,13 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
 
@@ -121,13 +119,12 @@
         else
         {
             messages::resourceNotFound(
-                res, "#MessageRegistryFile.v1_1_0.MessageRegistryFile",
-                registry);
-            res.end();
+                asyncResp->res,
+                "#MessageRegistryFile.v1_1_0.MessageRegistryFile", registry);
             return;
         }
 
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.id", "/redfish/v1/Registries/" + registry},
             {"@odata.type", "#MessageRegistryFile.v1_1_0.MessageRegistryFile"},
             {"Name", registry + " Message Registry File"},
@@ -145,10 +142,8 @@
 
         if (url != nullptr)
         {
-            res.jsonValue["Location"][0]["PublicationUri"] = url;
+            asyncResp->res.jsonValue["Location"][0]["PublicationUri"] = url;
         }
-
-        res.end();
     }
 };
 
@@ -169,13 +164,13 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 2)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
 
@@ -223,30 +218,29 @@
         else
         {
             messages::resourceNotFound(
-                res, "#MessageRegistryFile.v1_1_0.MessageRegistryFile",
-                registry);
-            res.end();
+                asyncResp->res,
+                "#MessageRegistryFile.v1_1_0.MessageRegistryFile", registry);
             return;
         }
 
         if (registry != registry1)
         {
-            messages::resourceNotFound(res, header->type, registry1);
-            res.end();
+            messages::resourceNotFound(asyncResp->res, header->type, registry1);
             return;
         }
 
-        res.jsonValue = {{"@Redfish.Copyright", header->copyright},
-                         {"@odata.type", header->type},
-                         {"Id", header->id},
-                         {"Name", header->name},
-                         {"Language", header->language},
-                         {"Description", header->description},
-                         {"RegistryPrefix", header->registryPrefix},
-                         {"RegistryVersion", header->registryVersion},
-                         {"OwningEntity", header->owningEntity}};
+        asyncResp->res.jsonValue = {
+            {"@Redfish.Copyright", header->copyright},
+            {"@odata.type", header->type},
+            {"Id", header->id},
+            {"Name", header->name},
+            {"Language", header->language},
+            {"Description", header->description},
+            {"RegistryPrefix", header->registryPrefix},
+            {"RegistryVersion", header->registryVersion},
+            {"OwningEntity", header->owningEntity}};
 
-        nlohmann::json& messageObj = res.jsonValue["Messages"];
+        nlohmann::json& messageObj = asyncResp->res.jsonValue["Messages"];
 
         // Go through the Message Registry and populate each Message
         for (const message_registries::MessageEntry* message : registryEntries)
@@ -271,7 +265,6 @@
                 }
             }
         }
-        res.end();
     }
 };
 
diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp
index 9caf4a3..ad15a05 100644
--- a/redfish-core/lib/metric_report.hpp
+++ b/redfish-core/lib/metric_report.hpp
@@ -31,7 +31,7 @@
     return metricValues;
 }
 
-inline void fillReport(const std::shared_ptr<AsyncResp>& asyncResp,
+inline void fillReport(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                        const std::string& id,
                        const std::variant<TimestampReadings>& var)
 {
@@ -75,16 +75,15 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#MetricReportCollection.MetricReportCollection";
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/TelemetryService/MetricReports";
-        res.jsonValue["Name"] = "Metric Report Collection";
+        asyncResp->res.jsonValue["Name"] = "Metric Report Collection";
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         telemetry::getReportCollection(asyncResp, telemetry::metricReportUri);
     }
 };
@@ -106,10 +105,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (params.size() != 1)
         {
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index fcbc99c..a1231b1 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -21,7 +21,7 @@
                            std::string, std::string>>;
 
 inline void fillReportDefinition(
-    const std::shared_ptr<AsyncResp>& asyncResp, const std::string& id,
+    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string& id,
     const std::vector<
         std::pair<std::string, std::variant<std::string, bool, uint64_t,
                                             ReadingParameters>>>& ret)
@@ -217,7 +217,7 @@
 }
 
 inline bool getChassisSensorNode(
-    const std::shared_ptr<AsyncResp>& asyncResp,
+    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
     const std::vector<std::pair<std::string, std::vector<std::string>>>&
         metrics,
     boost::container::flat_set<std::pair<std::string, std::string>>& matched)
@@ -257,8 +257,10 @@
 class AddReport
 {
   public:
-    AddReport(AddReportArgs argsIn, std::shared_ptr<AsyncResp> asyncResp) :
-        asyncResp{std::move(asyncResp)}, args{std::move(argsIn)}
+    AddReport(AddReportArgs argsIn,
+              const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) :
+        asyncResp(asyncResp),
+        args{std::move(argsIn)}
     {}
     ~AddReport()
     {
@@ -291,20 +293,19 @@
                 readingParams.emplace_back(dbusPath, "SINGLE", id, uri);
             }
         }
-
+        const std::shared_ptr<bmcweb::AsyncResp> aResp = asyncResp;
         crow::connections::systemBus->async_method_call(
-            [asyncResp = std::move(asyncResp), name = args.name,
-             uriToDbus = std::move(uriToDbus)](
+            [aResp, name = args.name, uriToDbus = std::move(uriToDbus)](
                 const boost::system::error_code ec, const std::string&) {
                 if (ec == boost::system::errc::file_exists)
                 {
                     messages::resourceAlreadyExists(
-                        asyncResp->res, "MetricReportDefinition", "Id", name);
+                        aResp->res, "MetricReportDefinition", "Id", name);
                     return;
                 }
                 if (ec == boost::system::errc::too_many_files_open)
                 {
-                    messages::createLimitReachedForResource(asyncResp->res);
+                    messages::createLimitReachedForResource(aResp->res);
                     return;
                 }
                 if (ec == boost::system::errc::argument_list_too_long)
@@ -315,17 +316,17 @@
                         metricProperties.emplace_back(uri);
                     }
                     messages::propertyValueIncorrect(
-                        asyncResp->res, metricProperties, "MetricProperties");
+                        aResp->res, metricProperties, "MetricProperties");
                     return;
                 }
                 if (ec)
                 {
-                    messages::internalError(asyncResp->res);
+                    messages::internalError(aResp->res);
                     BMCWEB_LOG_ERROR << "respHandler DBus error " << ec;
                     return;
                 }
 
-                messages::created(asyncResp->res);
+                messages::created(aResp->res);
             },
             telemetry::service, "/xyz/openbmc_project/Telemetry/Reports",
             "xyz.openbmc_project.Telemetry.ReportManager", "AddReport",
@@ -340,7 +341,7 @@
     }
 
   private:
-    std::shared_ptr<AsyncResp> asyncResp;
+    const std::shared_ptr<bmcweb::AsyncResp> asyncResp;
     AddReportArgs args;
     boost::container::flat_map<std::string, std::string> uriToDbus{};
 };
@@ -362,26 +363,26 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#MetricReportDefinitionCollection."
-                                       "MetricReportDefinitionCollection";
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#MetricReportDefinitionCollection."
+            "MetricReportDefinitionCollection";
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/TelemetryService/MetricReportDefinitions";
-        res.jsonValue["Name"] = "Metric Definition Collection";
+        asyncResp->res.jsonValue["Name"] = "Metric Definition Collection";
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         telemetry::getReportCollection(asyncResp,
                                        telemetry::metricReportDefinitionUri);
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         telemetry::AddReportArgs args;
-        if (!telemetry::getUserParameters(res, req, args))
+        if (!telemetry::getUserParameters(asyncResp->res, req, args))
         {
             return;
         }
@@ -434,10 +435,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (params.size() != 1)
         {
@@ -474,10 +475,10 @@
             telemetry::reportInterface);
     }
 
-    void doDelete(crow::Response& res, const crow::Request&,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request&,
                   const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index c8f63d1..491204e 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -141,11 +141,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-
         getData(asyncResp);
     }
 
@@ -161,7 +159,8 @@
         return hostName;
     }
 
-    void getNTPProtocolEnabled(const std::shared_ptr<AsyncResp>& asyncResp)
+    void getNTPProtocolEnabled(
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code errorCode,
@@ -190,7 +189,7 @@
             "xyz.openbmc_project.Time.Synchronization", "TimeSyncMethod");
     }
 
-    void getData(const std::shared_ptr<AsyncResp>& asyncResp)
+    void getData(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         asyncResp->res.jsonValue["@odata.type"] =
             "#ManagerNetworkProtocol.v1_5_0.ManagerNetworkProtocol";
@@ -355,8 +354,9 @@
     }
 
 #ifdef BMCWEB_ALLOW_DEPRECATED_HOSTNAME_PATCH
-    void handleHostnamePatch(const std::string& hostName,
-                             const std::shared_ptr<AsyncResp>& asyncResp)
+    void
+        handleHostnamePatch(const std::string& hostName,
+                            const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec) {
@@ -374,8 +374,9 @@
     }
 #endif
 
-    void handleNTPProtocolEnabled(const bool& ntpEnabled,
-                                  const std::shared_ptr<AsyncResp>& asyncResp)
+    void handleNTPProtocolEnabled(
+        const bool& ntpEnabled,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         std::string timeSyncMethod;
         if (ntpEnabled)
@@ -403,8 +404,9 @@
             std::variant<std::string>{timeSyncMethod});
     }
 
-    void handleNTPServersPatch(const std::vector<std::string>& ntpServers,
-                               const std::shared_ptr<AsyncResp>& asyncResp)
+    void handleNTPServersPatch(
+        const std::vector<std::string>& ntpServers,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec) {
@@ -420,8 +422,9 @@
             std::variant<std::vector<std::string>>{ntpServers});
     }
 
-    void handleIpmiProtocolEnabled(const bool ipmiProtocolEnabled,
-                                   const std::shared_ptr<AsyncResp>& asyncResp)
+    void handleIpmiProtocolEnabled(
+        const bool ipmiProtocolEnabled,
+        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         crow::connections::systemBus->async_method_call(
             [ipmiProtocolEnabled,
@@ -478,21 +481,22 @@
                 "xyz.openbmc_project.Control.Service.Attributes"});
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
         std::optional<std::string> newHostName;
         std::optional<nlohmann::json> ntp;
         std::optional<nlohmann::json> ipmi;
 
-        if (!json_util::readJson(req, res, "NTP", ntp, "HostName", newHostName,
-                                 "IPMI", ipmi))
+        if (!json_util::readJson(req, asyncResp->res, "NTP", ntp, "HostName",
+                                 newHostName, "IPMI", ipmi))
         {
             return;
         }
 
-        res.result(boost::beast::http::status::no_content);
+        asyncResp->res.result(boost::beast::http::status::no_content);
         if (newHostName)
         {
 #ifdef BMCWEB_ALLOW_DEPRECATED_HOSTNAME_PATCH
@@ -506,8 +510,8 @@
         {
             std::optional<std::vector<std::string>> ntpServers;
             std::optional<bool> ntpEnabled;
-            if (!json_util::readJson(*ntp, res, "NTPServers", ntpServers,
-                                     "ProtocolEnabled", ntpEnabled))
+            if (!json_util::readJson(*ntp, asyncResp->res, "NTPServers",
+                                     ntpServers, "ProtocolEnabled", ntpEnabled))
             {
                 return;
             }
@@ -531,7 +535,7 @@
         if (ipmi)
         {
             std::optional<bool> ipmiProtocolEnabled;
-            if (!json_util::readJson(*ipmi, res, "ProtocolEnabled",
+            if (!json_util::readJson(*ipmi, asyncResp->res, "ProtocolEnabled",
                                      ipmiProtocolEnabled))
             {
                 return;
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 0a8aa98..35d20a5 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -29,7 +29,7 @@
     "xyz.openbmc_project.PCIe.Device";
 
 static inline void
-    getPCIeDeviceList(const std::shared_ptr<AsyncResp>& asyncResp,
+    getPCIeDeviceList(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                       const std::string& name)
 {
     auto getPCIeMapCallback = [asyncResp, name](
@@ -89,10 +89,9 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         asyncResp->res.jsonValue = {
             {"@odata.type", "#PCIeDeviceCollection.PCIeDeviceCollection"},
             {"@odata.id", "/redfish/v1/Systems/system/PCIeDevices"},
@@ -121,10 +120,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -209,10 +208,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -302,10 +301,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 2)
         {
             messages::internalError(asyncResp->res);
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 99c45ef..4173ce8 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -39,121 +39,124 @@
 
   private:
     void setPowerCapOverride(
-        const std::shared_ptr<SensorsAsyncResp>& asyncResp,
+        const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp,
         std::vector<nlohmann::json>& powerControlCollections)
     {
-        auto getChassisPath =
-            [asyncResp, powerControlCollections](
-                const std::optional<std::string>& chassisPath) mutable {
-                if (!chassisPath)
-                {
-                    BMCWEB_LOG_ERROR << "Don't find valid chassis path ";
-                    messages::resourceNotFound(asyncResp->res, "Chassis",
-                                               asyncResp->chassisId);
-                    return;
-                }
+        auto getChassisPath = [sensorsAsyncResp, powerControlCollections](
+                                  const std::optional<std::string>&
+                                      chassisPath) mutable {
+            if (!chassisPath)
+            {
+                BMCWEB_LOG_ERROR << "Don't find valid chassis path ";
+                messages::resourceNotFound(sensorsAsyncResp->asyncResp->res,
+                                           "Chassis",
+                                           sensorsAsyncResp->chassisId);
+                return;
+            }
 
-                if (powerControlCollections.size() != 1)
+            if (powerControlCollections.size() != 1)
+            {
+                BMCWEB_LOG_ERROR << "Don't support multiple hosts at present ";
+                messages::resourceNotFound(sensorsAsyncResp->asyncResp->res,
+                                           "Power", "PowerControl");
+                return;
+            }
+
+            auto& item = powerControlCollections[0];
+
+            std::optional<nlohmann::json> powerLimit;
+            if (!json_util::readJson(item, sensorsAsyncResp->asyncResp->res,
+                                     "PowerLimit", powerLimit))
+            {
+                return;
+            }
+            if (!powerLimit)
+            {
+                return;
+            }
+            std::optional<uint32_t> value;
+            if (!json_util::readJson(*powerLimit,
+                                     sensorsAsyncResp->asyncResp->res,
+                                     "LimitInWatts", value))
+            {
+                return;
+            }
+            if (!value)
+            {
+                return;
+            }
+            auto valueHandler = [value, sensorsAsyncResp](
+                                    const boost::system::error_code ec,
+                                    const SensorVariant& powerCapEnable) {
+                if (ec)
                 {
+                    messages::internalError(sensorsAsyncResp->asyncResp->res);
                     BMCWEB_LOG_ERROR
-                        << "Don't support multiple hosts at present ";
-                    messages::resourceNotFound(asyncResp->res, "Power",
-                                               "PowerControl");
+                        << "powerCapEnable Get handler: Dbus error " << ec;
+                    return;
+                }
+                // Check PowerCapEnable
+                const bool* b = std::get_if<bool>(&powerCapEnable);
+                if (b == nullptr)
+                {
+                    messages::internalError(sensorsAsyncResp->asyncResp->res);
+                    BMCWEB_LOG_ERROR << "Fail to get PowerCapEnable status ";
+                    return;
+                }
+                if (!(*b))
+                {
+                    messages::actionNotSupported(
+                        sensorsAsyncResp->asyncResp->res,
+                        "Setting LimitInWatts when PowerLimit "
+                        "feature is disabled");
+                    BMCWEB_LOG_ERROR << "PowerLimit feature is disabled ";
                     return;
                 }
 
-                auto& item = powerControlCollections[0];
-
-                std::optional<nlohmann::json> powerLimit;
-                if (!json_util::readJson(item, asyncResp->res, "PowerLimit",
-                                         powerLimit))
-                {
-                    return;
-                }
-                if (!powerLimit)
-                {
-                    return;
-                }
-                std::optional<uint32_t> value;
-                if (!json_util::readJson(*powerLimit, asyncResp->res,
-                                         "LimitInWatts", value))
-                {
-                    return;
-                }
-                if (!value)
-                {
-                    return;
-                }
-                auto valueHandler = [value, asyncResp](
-                                        const boost::system::error_code ec,
-                                        const SensorVariant& powerCapEnable) {
-                    if (ec)
-                    {
-                        messages::internalError(asyncResp->res);
-                        BMCWEB_LOG_ERROR
-                            << "powerCapEnable Get handler: Dbus error " << ec;
-                        return;
-                    }
-                    // Check PowerCapEnable
-                    const bool* b = std::get_if<bool>(&powerCapEnable);
-                    if (b == nullptr)
-                    {
-                        messages::internalError(asyncResp->res);
-                        BMCWEB_LOG_ERROR
-                            << "Fail to get PowerCapEnable status ";
-                        return;
-                    }
-                    if (!(*b))
-                    {
-                        messages::actionNotSupported(
-                            asyncResp->res,
-                            "Setting LimitInWatts when PowerLimit "
-                            "feature is disabled");
-                        BMCWEB_LOG_ERROR << "PowerLimit feature is disabled ";
-                        return;
-                    }
-
-                    crow::connections::systemBus->async_method_call(
-                        [asyncResp](const boost::system::error_code ec2) {
-                            if (ec2)
-                            {
-                                BMCWEB_LOG_DEBUG
-                                    << "Power Limit Set: Dbus error: " << ec2;
-                                messages::internalError(asyncResp->res);
-                                return;
-                            }
-                            asyncResp->res.result(
-                                boost::beast::http::status::no_content);
-                        },
-                        "xyz.openbmc_project.Settings",
-                        "/xyz/openbmc_project/control/host0/power_cap",
-                        "org.freedesktop.DBus.Properties", "Set",
-                        "xyz.openbmc_project.Control.Power.Cap", "PowerCap",
-                        std::variant<uint32_t>(*value));
-                };
                 crow::connections::systemBus->async_method_call(
-                    std::move(valueHandler), "xyz.openbmc_project.Settings",
+                    [sensorsAsyncResp](const boost::system::error_code ec2) {
+                        if (ec2)
+                        {
+                            BMCWEB_LOG_DEBUG << "Power Limit Set: Dbus error: "
+                                             << ec2;
+                            messages::internalError(
+                                sensorsAsyncResp->asyncResp->res);
+                            return;
+                        }
+                        sensorsAsyncResp->asyncResp->res.result(
+                            boost::beast::http::status::no_content);
+                    },
+                    "xyz.openbmc_project.Settings",
                     "/xyz/openbmc_project/control/host0/power_cap",
-                    "org.freedesktop.DBus.Properties", "Get",
-                    "xyz.openbmc_project.Control.Power.Cap", "PowerCapEnable");
+                    "org.freedesktop.DBus.Properties", "Set",
+                    "xyz.openbmc_project.Control.Power.Cap", "PowerCap",
+                    std::variant<uint32_t>(*value));
             };
-        getValidChassisPath(asyncResp, std::move(getChassisPath));
+            crow::connections::systemBus->async_method_call(
+                std::move(valueHandler), "xyz.openbmc_project.Settings",
+                "/xyz/openbmc_project/control/host0/power_cap",
+                "org.freedesktop.DBus.Properties", "Get",
+                "xyz.openbmc_project.Control.Power.Cap", "PowerCapEnable");
+        };
+        getValidChassisPath(sensorsAsyncResp, std::move(getChassisPath));
     }
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            res.result(boost::beast::http::status::internal_server_error);
-            res.end();
+            asyncResp->res.result(
+                boost::beast::http::status::internal_server_error);
             return;
         }
         const std::string& chassisName = params[0];
 
-        res.jsonValue["PowerControl"] = nlohmann::json::array();
+        asyncResp->res.jsonValue["PowerControl"] = nlohmann::json::array();
 
         auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::paths.at(sensors::node::power),
+            asyncResp, chassisName,
+            sensors::dbus::paths.at(sensors::node::power),
             sensors::node::power);
 
         getChassisData(sensorAsyncResp);
@@ -217,14 +220,15 @@
                         properties) {
                     if (ec)
                     {
-                        messages::internalError(sensorAsyncResp->res);
+                        messages::internalError(
+                            sensorAsyncResp->asyncResp->res);
                         BMCWEB_LOG_ERROR
                             << "Power Limit GetAll handler: Dbus error " << ec;
                         return;
                     }
 
-                    nlohmann::json& tempArray =
-                        sensorAsyncResp->res.jsonValue["PowerControl"];
+                    nlohmann::json& tempArray = sensorAsyncResp->asyncResp->res
+                                                    .jsonValue["PowerControl"];
 
                     // Put multiple "sensors" into a single PowerControl, 0, so
                     // only create the first one
@@ -324,41 +328,43 @@
                 "xyz.openbmc_project.Inventory.Item.Board",
                 "xyz.openbmc_project.Inventory.Item.Chassis"});
     }
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
 
         const std::string& chassisName = params[0];
-        auto asyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::paths.at(sensors::node::power),
+
+        auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
+            asyncResp, chassisName,
+            sensors::dbus::paths.at(sensors::node::power),
             sensors::node::power);
 
         std::optional<std::vector<nlohmann::json>> voltageCollections;
         std::optional<std::vector<nlohmann::json>> powerCtlCollections;
 
-        if (!json_util::readJson(req, asyncResp->res, "PowerControl",
-                                 powerCtlCollections, "Voltages",
-                                 voltageCollections))
+        if (!json_util::readJson(req, sensorAsyncResp->asyncResp->res,
+                                 "PowerControl", powerCtlCollections,
+                                 "Voltages", voltageCollections))
         {
             return;
         }
 
         if (powerCtlCollections)
         {
-            setPowerCapOverride(asyncResp, *powerCtlCollections);
+            setPowerCapOverride(sensorAsyncResp, *powerCtlCollections);
         }
         if (voltageCollections)
         {
             std::unordered_map<std::string, std::vector<nlohmann::json>>
                 allCollections;
             allCollections.emplace("Voltages", *std::move(voltageCollections));
-            checkAndDoSensorsOverride(asyncResp, allCollections);
+            checkAndDoSensorsOverride(sensorAsyncResp, allCollections);
         }
     }
 };
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index f816566..efc6c32 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -45,7 +45,7 @@
     "xyz.openbmc_project.Inventory.Item.Accelerator"};
 
 inline void
-    getCpuDataByInterface(const std::shared_ptr<AsyncResp>& aResp,
+    getCpuDataByInterface(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                           const InterfacesProperties& cpuInterfacesProperties)
 {
     BMCWEB_LOG_DEBUG << "Get CPU resources by interface.";
@@ -152,7 +152,7 @@
     return;
 }
 
-inline void getCpuDataByService(std::shared_ptr<AsyncResp> aResp,
+inline void getCpuDataByService(std::shared_ptr<bmcweb::AsyncResp> aResp,
                                 const std::string& cpuId,
                                 const std::string& service,
                                 const std::string& objPath)
@@ -228,7 +228,7 @@
         "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
 }
 
-inline void getCpuAssetData(std::shared_ptr<AsyncResp> aResp,
+inline void getCpuAssetData(std::shared_ptr<bmcweb::AsyncResp> aResp,
                             const std::string& service,
                             const std::string& objPath)
 {
@@ -320,7 +320,7 @@
         "xyz.openbmc_project.Inventory.Decorator.Asset");
 }
 
-inline void getCpuRevisionData(std::shared_ptr<AsyncResp> aResp,
+inline void getCpuRevisionData(std::shared_ptr<bmcweb::AsyncResp> aResp,
                                const std::string& service,
                                const std::string& objPath)
 {
@@ -356,10 +356,9 @@
         "xyz.openbmc_project.Inventory.Decorator.Revision");
 }
 
-inline void getAcceleratorDataByService(std::shared_ptr<AsyncResp> aResp,
-                                        const std::string& acclrtrId,
-                                        const std::string& service,
-                                        const std::string& objPath)
+inline void getAcceleratorDataByService(
+    std::shared_ptr<bmcweb::AsyncResp> aResp, const std::string& acclrtrId,
+    const std::string& service, const std::string& objPath)
 {
     BMCWEB_LOG_DEBUG
         << "Get available system Accelerator resources by service.";
@@ -436,7 +435,7 @@
  *                                      speed cores.
  */
 inline void highSpeedCoreIdsHandler(
-    const std::shared_ptr<AsyncResp>& aResp,
+    const std::shared_ptr<bmcweb::AsyncResp>& aResp,
     const BaseSpeedPrioritySettingsProperty& baseSpeedSettings)
 {
     // The D-Bus property does not indicate which bucket is the "high
@@ -475,7 +474,7 @@
  * @param[in]       service     D-Bus service to query.
  * @param[in]       objPath     D-Bus object to query.
  */
-inline void getCpuConfigData(const std::shared_ptr<AsyncResp>& aResp,
+inline void getCpuConfigData(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                              const std::string& cpuId,
                              const std::string& service,
                              const std::string& objPath)
@@ -585,7 +584,7 @@
  * @param[in]       service     D-Bus service to query.
  * @param[in]       objPath     D-Bus object to query.
  */
-inline void getCpuLocationCode(std::shared_ptr<AsyncResp> aResp,
+inline void getCpuLocationCode(std::shared_ptr<bmcweb::AsyncResp> aResp,
                                const std::string& service,
                                const std::string& objPath)
 {
@@ -629,7 +628,7 @@
  *                                  successfully finding object.
  */
 template <typename Handler>
-inline void getProcessorObject(const std::shared_ptr<AsyncResp>& resp,
+inline void getProcessorObject(const std::shared_ptr<bmcweb::AsyncResp>& resp,
                                const std::string& processorId,
                                Handler&& handler)
 {
@@ -698,7 +697,7 @@
             "xyz.openbmc_project.Control.Processor.CurrentOperatingConfig"});
 }
 
-inline void getProcessorData(const std::shared_ptr<AsyncResp>& aResp,
+inline void getProcessorData(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                              const std::string& processorId,
                              const std::string& objectPath,
                              const MapperServiceMap& serviceMap)
@@ -749,9 +748,10 @@
  * @param[in]       service     D-Bus service name to query.
  * @param[in]       objPath     D-Bus object to query.
  */
-inline void getOperatingConfigData(const std::shared_ptr<AsyncResp>& aResp,
-                                   const std::string& service,
-                                   const std::string& objPath)
+inline void
+    getOperatingConfigData(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                           const std::string& service,
+                           const std::string& objPath)
 {
     crow::connections::systemBus->async_method_call(
         [aResp](boost::system::error_code ec,
@@ -870,23 +870,21 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
 
         const std::string& cpuName = params[0];
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#OperatingConfigCollection.OperatingConfigCollection";
-        res.jsonValue["@odata.id"] = req.url;
-        res.jsonValue["Name"] = "Operating Config Collection";
-
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+        asyncResp->res.jsonValue["@odata.id"] = req.url;
+        asyncResp->res.jsonValue["Name"] = "Operating Config Collection";
 
         // First find the matching CPU object so we know how to constrain our
         // search for related Config objects.
@@ -952,21 +950,19 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 2)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
 
         const std::string& cpuName = params[0];
         const std::string& configName = params[1];
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         // Ask for all objects implementing OperatingConfig so we can search for
         // one with a matching name
         crow::connections::systemBus->async_method_call(
@@ -1037,15 +1033,15 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#ProcessorCollection.ProcessorCollection";
-        res.jsonValue["Name"] = "Processor Collection";
+        asyncResp->res.jsonValue["Name"] = "Processor Collection";
 
-        res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system/Processors";
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+        asyncResp->res.jsonValue["@odata.id"] =
+            "/redfish/v1/Systems/system/Processors";
 
         collection_util::getCollectionMembers(
             asyncResp, "/redfish/v1/Systems/system/Processors",
@@ -1076,25 +1072,23 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         // Check if there is required param, truly entering this shall be
         // impossible
         if (params.size() != 1)
         {
-            messages::internalError(res);
-
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
         const std::string& processorId = params[0];
-        res.jsonValue["@odata.type"] = "#Processor.v1_11_0.Processor";
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#Processor.v1_11_0.Processor";
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Systems/system/Processors/" + processorId;
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         getProcessorObject(asyncResp, processorId, getProcessorData);
     }
 };
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 7ed9685..bef2753 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -41,7 +41,8 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         // Note that control also reaches here via doPost and doDelete.
@@ -51,28 +52,28 @@
 
         if (session == nullptr)
         {
-            messages::resourceNotFound(res, "Session", params[0]);
-            res.end();
+            messages::resourceNotFound(asyncResp->res, "Session", params[0]);
             return;
         }
 
-        res.jsonValue["Id"] = session->uniqueId;
-        res.jsonValue["UserName"] = session->username;
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["Id"] = session->uniqueId;
+        asyncResp->res.jsonValue["UserName"] = session->username;
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/SessionService/Sessions/" + session->uniqueId;
-        res.jsonValue["@odata.type"] = "#Session.v1_3_0.Session";
-        res.jsonValue["Name"] = "User Session";
-        res.jsonValue["Description"] = "Manager User Session";
-        res.jsonValue["ClientOriginIPAddress"] = session->clientIp;
+        asyncResp->res.jsonValue["@odata.type"] = "#Session.v1_3_0.Session";
+        asyncResp->res.jsonValue["Name"] = "User Session";
+        asyncResp->res.jsonValue["Description"] = "Manager User Session";
+        asyncResp->res.jsonValue["ClientOriginIPAddress"] = session->clientIp;
 #ifdef BMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE
-        res.jsonValue["Oem"]["OpenBMC"]["@odata.type"] =
+        asyncResp->res.jsonValue["Oem"]["OpenBMC"]["@odata.type"] =
             "#OemSession.v1_0_0.Session";
-        res.jsonValue["Oem"]["OpenBMC"]["ClientID"] = session->clientId;
+        asyncResp->res.jsonValue["Oem"]["OpenBMC"]["ClientID"] =
+            session->clientId;
 #endif
-        res.end();
     }
 
-    void doDelete(crow::Response& res, const crow::Request& req,
+    void doDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                  const crow::Request& req,
                   const std::vector<std::string>& params) override
     {
         // Need only 1 param which should be id of session to be deleted
@@ -82,8 +83,7 @@
             BMCWEB_LOG_ERROR << "Session DELETE has been called with invalid "
                                 "number of params";
 
-            messages::generalError(res);
-            res.end();
+            messages::generalError(asyncResp->res);
             return;
         }
 
@@ -93,8 +93,7 @@
 
         if (session == nullptr)
         {
-            messages::resourceNotFound(res, "Session", params[0]);
-            res.end();
+            messages::resourceNotFound(asyncResp->res, "Session", params[0]);
             return;
         }
 
@@ -108,14 +107,13 @@
             if (!isAllowedWithoutConfigureSelf(req))
             {
                 BMCWEB_LOG_WARNING << "DELETE Session denied access";
-                messages::insufficientPrivilege(res);
-                res.end();
+                messages::insufficientPrivilege(asyncResp->res);
                 return;
             }
         }
 
         // DELETE should return representation of object that will be removed
-        doGet(res, req, params);
+        doGet(asyncResp, req, params);
 
         persistent_data::SessionStore::getInstance().removeSession(session);
     }
@@ -145,55 +143,55 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
         std::vector<const std::string*> sessionIds =
             persistent_data::SessionStore::getInstance().getUniqueIds(
                 false, persistent_data::PersistenceType::TIMEOUT);
 
-        res.jsonValue["Members@odata.count"] = sessionIds.size();
-        res.jsonValue["Members"] = nlohmann::json::array();
+        asyncResp->res.jsonValue["Members@odata.count"] = sessionIds.size();
+        asyncResp->res.jsonValue["Members"] = nlohmann::json::array();
         for (const std::string* uid : sessionIds)
         {
-            res.jsonValue["Members"].push_back(
+            asyncResp->res.jsonValue["Members"].push_back(
                 {{"@odata.id", "/redfish/v1/SessionService/Sessions/" + *uid}});
         }
-        res.jsonValue["Members@odata.count"] = sessionIds.size();
-        res.jsonValue["@odata.type"] = "#SessionCollection.SessionCollection";
-        res.jsonValue["@odata.id"] = "/redfish/v1/SessionService/Sessions/";
-        res.jsonValue["Name"] = "Session Collection";
-        res.jsonValue["Description"] = "Session Collection";
-        res.end();
+        asyncResp->res.jsonValue["Members@odata.count"] = sessionIds.size();
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#SessionCollection.SessionCollection";
+        asyncResp->res.jsonValue["@odata.id"] =
+            "/redfish/v1/SessionService/Sessions/";
+        asyncResp->res.jsonValue["Name"] = "Session Collection";
+        asyncResp->res.jsonValue["Description"] = "Session Collection";
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         std::string username;
         std::string password;
         std::optional<nlohmann::json> oemObject;
         std::string clientId;
-        if (!json_util::readJson(req, res, "UserName", username, "Password",
-                                 password, "Oem", oemObject))
+        if (!json_util::readJson(req, asyncResp->res, "UserName", username,
+                                 "Password", password, "Oem", oemObject))
         {
-            res.end();
             return;
         }
 
         if (password.empty() || username.empty() ||
-            res.result() != boost::beast::http::status::ok)
+            asyncResp->res.result() != boost::beast::http::status::ok)
         {
             if (username.empty())
             {
-                messages::propertyMissing(res, "UserName");
+                messages::propertyMissing(asyncResp->res, "UserName");
             }
 
             if (password.empty())
             {
-                messages::propertyMissing(res, "Password");
+                messages::propertyMissing(asyncResp->res, "Password");
             }
-            res.end();
 
             return;
         }
@@ -202,25 +200,24 @@
         bool isConfigureSelfOnly = pamrc == PAM_NEW_AUTHTOK_REQD;
         if ((pamrc != PAM_SUCCESS) && !isConfigureSelfOnly)
         {
-            messages::resourceAtUriUnauthorized(res, std::string(req.url),
+            messages::resourceAtUriUnauthorized(asyncResp->res,
+                                                std::string(req.url),
                                                 "Invalid username or password");
-            res.end();
-
             return;
         }
 #ifdef BMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE
         if (oemObject)
         {
             std::optional<nlohmann::json> bmcOem;
-            if (!json_util::readJson(*oemObject, res, "OpenBMC", bmcOem))
+            if (!json_util::readJson(*oemObject, asyncResp->res, "OpenBMC",
+                                     bmcOem))
             {
-                res.end();
                 return;
             }
-            if (!json_util::readJson(*bmcOem, res, "ClientID", clientId))
+            if (!json_util::readJson(*bmcOem, asyncResp->res, "ClientID",
+                                     clientId))
             {
                 BMCWEB_LOG_ERROR << "Could not read ClientId";
-                res.end();
                 return;
             }
         }
@@ -231,17 +228,18 @@
             persistent_data::SessionStore::getInstance().generateUserSession(
                 username, req.ipAddress.to_string(), clientId,
                 persistent_data::PersistenceType::TIMEOUT, isConfigureSelfOnly);
-        res.addHeader("X-Auth-Token", session->sessionToken);
-        res.addHeader("Location", "/redfish/v1/SessionService/Sessions/" +
-                                      session->uniqueId);
-        res.result(boost::beast::http::status::created);
+        asyncResp->res.addHeader("X-Auth-Token", session->sessionToken);
+        asyncResp->res.addHeader("Location",
+                                 "/redfish/v1/SessionService/Sessions/" +
+                                     session->uniqueId);
+        asyncResp->res.result(boost::beast::http::status::created);
         if (session->isConfigureSelfOnly)
         {
             messages::passwordChangeRequired(
-                res,
+                asyncResp->res,
                 "/redfish/v1/AccountService/Accounts/" + session->username);
         }
-        memberSession.doGet(res, req, {session->uniqueId});
+        memberSession.doGet(asyncResp, req, {session->uniqueId});
     }
 
     /**
@@ -267,30 +265,30 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#SessionService.v1_0_2.SessionService";
-        res.jsonValue["@odata.id"] = "/redfish/v1/SessionService/";
-        res.jsonValue["Name"] = "Session Service";
-        res.jsonValue["Id"] = "SessionService";
-        res.jsonValue["Description"] = "Session Service";
-        res.jsonValue["SessionTimeout"] =
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#SessionService.v1_0_2.SessionService";
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/SessionService/";
+        asyncResp->res.jsonValue["Name"] = "Session Service";
+        asyncResp->res.jsonValue["Id"] = "SessionService";
+        asyncResp->res.jsonValue["Description"] = "Session Service";
+        asyncResp->res.jsonValue["SessionTimeout"] =
             persistent_data::SessionStore::getInstance().getTimeoutInSeconds();
-        res.jsonValue["ServiceEnabled"] = true;
+        asyncResp->res.jsonValue["ServiceEnabled"] = true;
 
-        res.jsonValue["Sessions"] = {
+        asyncResp->res.jsonValue["Sessions"] = {
             {"@odata.id", "/redfish/v1/SessionService/Sessions"}};
-
-        res.end();
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
         std::optional<int64_t> sessionTimeout;
-        if (!json_util::readJson(req, res, "SessionTimeout", sessionTimeout))
+        if (!json_util::readJson(req, asyncResp->res, "SessionTimeout",
+                                 sessionTimeout))
         {
             return;
         }
@@ -314,7 +312,8 @@
             else
             {
                 messages::propertyValueNotInList(
-                    res, std::to_string(*sessionTimeout), "SessionTimeOut");
+                    asyncResp->res, std::to_string(*sessionTimeout),
+                    "SessionTimeOut");
             }
         }
     }
diff --git a/redfish-core/lib/redfish_util.hpp b/redfish-core/lib/redfish_util.hpp
index acaea53..620e977 100644
--- a/redfish-core/lib/redfish_util.hpp
+++ b/redfish-core/lib/redfish_util.hpp
@@ -22,7 +22,7 @@
 {
 
 template <typename CallbackFunc>
-void getMainChassisId(std::shared_ptr<AsyncResp> asyncResp,
+void getMainChassisId(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
                       CallbackFunc&& callback)
 {
     // Find managed chassis
diff --git a/redfish-core/lib/roles.hpp b/redfish-core/lib/roles.hpp
index de2e1ff..8e00d43 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -86,25 +86,26 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
+
             return;
         }
         const std::string& roleId = params[0];
         nlohmann::json privArray = nlohmann::json::array();
         if (false == getAssignedPrivFromRole(roleId, privArray))
         {
-            messages::resourceNotFound(res, "Role", roleId);
-            res.end();
+            messages::resourceNotFound(asyncResp->res, "Role", roleId);
+
             return;
         }
 
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.type", "#Role.v1_2_2.Role"},
             {"Name", "User Role"},
             {"Description", roleId + " User Role"},
@@ -114,7 +115,6 @@
             {"RoleId", roleId},
             {"@odata.id", "/redfish/v1/AccountService/Roles/" + roleId},
             {"AssignedPrivileges", std::move(privArray)}};
-        res.end();
     }
 };
 
@@ -133,14 +133,15 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-        res.jsonValue = {{"@odata.id", "/redfish/v1/AccountService/Roles"},
-                         {"@odata.type", "#RoleCollection.RoleCollection"},
-                         {"Name", "Roles Collection"},
-                         {"Description", "BMC User Roles"}};
+
+        asyncResp->res.jsonValue = {
+            {"@odata.id", "/redfish/v1/AccountService/Roles"},
+            {"@odata.type", "#RoleCollection.RoleCollection"},
+            {"Name", "Roles Collection"},
+            {"Description", "BMC User Roles"}};
 
         crow::connections::systemBus->async_method_call(
             [asyncResp](const boost::system::error_code ec,
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 9f06d2f..5140180 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -172,19 +172,21 @@
         const std::string dbusPath;
     };
 
-    SensorsAsyncResp(crow::Response& response, const std::string& chassisIdIn,
+    SensorsAsyncResp(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                     const std::string& chassisIdIn,
                      const std::vector<const char*>& typesIn,
                      const std::string_view& subNode) :
-        res(response),
+        asyncResp(asyncResp),
         chassisId(chassisIdIn), types(typesIn), chassisSubNode(subNode)
     {}
 
     // Store extra data about sensor mapping and return it in callback
-    SensorsAsyncResp(crow::Response& response, const std::string& chassisIdIn,
+    SensorsAsyncResp(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                     const std::string& chassisIdIn,
                      const std::vector<const char*>& typesIn,
                      const std::string_view& subNode,
                      DataCompleteCb&& creationComplete) :
-        res(response),
+        asyncResp(asyncResp),
         chassisId(chassisIdIn), types(typesIn),
         chassisSubNode(subNode), metadata{std::vector<SensorData>()},
         dataComplete{std::move(creationComplete)}
@@ -192,18 +194,19 @@
 
     ~SensorsAsyncResp()
     {
-        if (res.result() == boost::beast::http::status::internal_server_error)
+        if (asyncResp->res.result() ==
+            boost::beast::http::status::internal_server_error)
         {
             // Reset the json object to clear out any data that made it in
             // before the error happened todo(ed) handle error condition with
             // proper code
-            res.jsonValue = nlohmann::json::object();
+            asyncResp->res.jsonValue = nlohmann::json::object();
         }
 
         if (dataComplete && metadata)
         {
             boost::container::flat_map<std::string, std::string> map;
-            if (res.result() == boost::beast::http::status::ok)
+            if (asyncResp->res.result() == boost::beast::http::status::ok)
             {
                 for (auto& sensor : *metadata)
                 {
@@ -211,10 +214,8 @@
                                               sensor.dbusPath));
                 }
             }
-            dataComplete(res.result(), map);
+            dataComplete(asyncResp->res.result(), map);
         }
-
-        res.end();
     }
 
     void addMetadata(const nlohmann::json& sensorObject,
@@ -242,7 +243,7 @@
         }
     }
 
-    crow::Response& res;
+    const std::shared_ptr<bmcweb::AsyncResp> asyncResp;
     const std::string chassisId;
     const std::vector<const char*> types;
     const std::string chassisSubNode;
@@ -323,7 +324,7 @@
         BMCWEB_LOG_DEBUG << "getObjectsWithConnection resp_handler enter";
         if (ec)
         {
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             BMCWEB_LOG_ERROR
                 << "getObjectsWithConnection resp_handler: Dbus error " << ec;
             return;
@@ -416,7 +417,7 @@
     if ((allSensors == nullptr) || (activeSensors == nullptr))
     {
         messages::resourceNotFound(
-            sensorsAsyncResp->res, sensorsAsyncResp->chassisSubNode,
+            sensorsAsyncResp->asyncResp->res, sensorsAsyncResp->chassisSubNode,
             sensorsAsyncResp->chassisSubNode == sensors::node::thermal
                 ? "Temperatures"
                 : "Voltages");
@@ -464,7 +465,7 @@
             {
                 BMCWEB_LOG_ERROR
                     << "getValidChassisPath respHandler DBUS error: " << ec;
-                messages::internalError(asyncResp->res);
+                messages::internalError(asyncResp->asyncResp->res);
                 return;
             }
 
@@ -517,7 +518,7 @@
         if (ec)
         {
             BMCWEB_LOG_ERROR << "getChassis respHandler DBUS error: " << ec;
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             return;
         }
 
@@ -540,46 +541,47 @@
         }
         if (chassisPath == nullptr)
         {
-            messages::resourceNotFound(sensorsAsyncResp->res, "Chassis",
-                                       sensorsAsyncResp->chassisId);
+            messages::resourceNotFound(sensorsAsyncResp->asyncResp->res,
+                                       "Chassis", sensorsAsyncResp->chassisId);
             return;
         }
 
         const std::string& chassisSubNode = sensorsAsyncResp->chassisSubNode;
         if (chassisSubNode == sensors::node::power)
         {
-            sensorsAsyncResp->res.jsonValue["@odata.type"] =
+            sensorsAsyncResp->asyncResp->res.jsonValue["@odata.type"] =
                 "#Power.v1_5_2.Power";
         }
         else if (chassisSubNode == sensors::node::thermal)
         {
-            sensorsAsyncResp->res.jsonValue["@odata.type"] =
+            sensorsAsyncResp->asyncResp->res.jsonValue["@odata.type"] =
                 "#Thermal.v1_4_0.Thermal";
-            sensorsAsyncResp->res.jsonValue["Fans"] = nlohmann::json::array();
-            sensorsAsyncResp->res.jsonValue["Temperatures"] =
+            sensorsAsyncResp->asyncResp->res.jsonValue["Fans"] =
+                nlohmann::json::array();
+            sensorsAsyncResp->asyncResp->res.jsonValue["Temperatures"] =
                 nlohmann::json::array();
         }
         else if (chassisSubNode == sensors::node::sensors)
         {
-            sensorsAsyncResp->res.jsonValue["@odata.type"] =
+            sensorsAsyncResp->asyncResp->res.jsonValue["@odata.type"] =
                 "#SensorCollection.SensorCollection";
-            sensorsAsyncResp->res.jsonValue["Description"] =
+            sensorsAsyncResp->asyncResp->res.jsonValue["Description"] =
                 "Collection of Sensors for this Chassis";
-            sensorsAsyncResp->res.jsonValue["Members"] =
+            sensorsAsyncResp->asyncResp->res.jsonValue["Members"] =
                 nlohmann::json::array();
-            sensorsAsyncResp->res.jsonValue["Members@odata.count"] = 0;
+            sensorsAsyncResp->asyncResp->res.jsonValue["Members@odata.count"] =
+                0;
         }
 
         if (chassisSubNode != sensors::node::sensors)
         {
-            sensorsAsyncResp->res.jsonValue["Id"] = chassisSubNode;
+            sensorsAsyncResp->asyncResp->res.jsonValue["Id"] = chassisSubNode;
         }
 
-        sensorsAsyncResp->res.jsonValue["@odata.id"] =
+        sensorsAsyncResp->asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Chassis/" + sensorsAsyncResp->chassisId + "/" +
             chassisSubNode;
-        sensorsAsyncResp->res.jsonValue["Name"] = chassisSubNode;
-
+        sensorsAsyncResp->asyncResp->res.jsonValue["Name"] = chassisSubNode;
         // Get the list of all sensors for this Chassis element
         std::string sensorPath = *chassisPath + "/all_sensors";
         crow::connections::systemBus->async_method_call(
@@ -591,7 +593,8 @@
                 {
                     if (e.value() != EBADR)
                     {
-                        messages::internalError(sensorsAsyncResp->res);
+                        messages::internalError(
+                            sensorsAsyncResp->asyncResp->res);
                         return;
                     }
                 }
@@ -600,7 +603,8 @@
                 if (nodeSensorList == nullptr)
                 {
                     messages::resourceNotFound(
-                        sensorsAsyncResp->res, sensorsAsyncResp->chassisSubNode,
+                        sensorsAsyncResp->asyncResp->res,
+                        sensorsAsyncResp->chassisSubNode,
                         sensorsAsyncResp->chassisSubNode ==
                                 sensors::node::thermal
                             ? "Temperatures"
@@ -664,7 +668,7 @@
         BMCWEB_LOG_DEBUG << "getObjectManagerPaths respHandler enter";
         if (ec)
         {
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             BMCWEB_LOG_ERROR << "getObjectManagerPaths respHandler: DBus error "
                              << ec;
             return;
@@ -1180,7 +1184,8 @@
                         if (endpoints == nullptr)
                         {
                             BMCWEB_LOG_ERROR << "Invalid association interface";
-                            messages::internalError(sensorsAsyncResp->res);
+                            messages::internalError(
+                                sensorsAsyncResp->asyncResp->res);
                             return;
                         }
 
@@ -1220,7 +1225,7 @@
                                     BMCWEB_LOG_ERROR
                                         << "Invalid redundancy interface";
                                     messages::internalError(
-                                        sensorsAsyncResp->res);
+                                        sensorsAsyncResp->asyncResp->res);
                                     return;
                                 }
 
@@ -1240,7 +1245,7 @@
                                         << "Invalid redundancy interface "
                                            "types";
                                     messages::internalError(
-                                        sensorsAsyncResp->res);
+                                        sensorsAsyncResp->asyncResp->res);
                                     return;
                                 }
                                 sdbusplus::message::object_path objectPath(
@@ -1250,7 +1255,7 @@
                                 {
                                     // this should be impossible
                                     messages::internalError(
-                                        sensorsAsyncResp->res);
+                                        sensorsAsyncResp->asyncResp->res);
                                     return;
                                 }
                                 std::replace(name.begin(), name.end(), '_',
@@ -1272,7 +1277,8 @@
                                 }
                                 std::vector<nlohmann::json> redfishCollection;
                                 const auto& fanRedfish =
-                                    sensorsAsyncResp->res.jsonValue["Fans"];
+                                    sensorsAsyncResp->asyncResp->res
+                                        .jsonValue["Fans"];
                                 for (const std::string& item : *collection)
                                 {
                                     sdbusplus::message::object_path path(item);
@@ -1301,7 +1307,7 @@
                                         BMCWEB_LOG_ERROR
                                             << "failed to find fan in schema";
                                         messages::internalError(
-                                            sensorsAsyncResp->res);
+                                            sensorsAsyncResp->asyncResp->res);
                                         return;
                                     }
                                 }
@@ -1311,7 +1317,7 @@
                                         ? collection->size() - *allowedFailures
                                         : 0;
                                 nlohmann::json& jResp =
-                                    sensorsAsyncResp->res
+                                    sensorsAsyncResp->asyncResp->res
                                         .jsonValue["Redundancy"];
                                 jResp.push_back(
                                     {{"@odata.id",
@@ -1351,7 +1357,7 @@
 inline void
     sortJSONResponse(const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp)
 {
-    nlohmann::json& response = sensorsAsyncResp->res.jsonValue;
+    nlohmann::json& response = sensorsAsyncResp->asyncResp->res.jsonValue;
     std::array<std::string, 2> sensorHeaders{"Temperatures", "Fans"};
     if (sensorsAsyncResp->chassisSubNode == sensors::node::power)
     {
@@ -1658,7 +1664,7 @@
             {
                 BMCWEB_LOG_ERROR
                     << "getInventoryItemsData respHandler DBus error " << ec;
-                messages::internalError(sensorsAsyncResp->res);
+                messages::internalError(sensorsAsyncResp->asyncResp->res);
                 return;
             }
 
@@ -1744,7 +1750,7 @@
         BMCWEB_LOG_DEBUG << "getInventoryItemsConnections respHandler enter";
         if (ec)
         {
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             BMCWEB_LOG_ERROR
                 << "getInventoryItemsConnections respHandler DBus error " << ec;
             return;
@@ -1828,7 +1834,7 @@
         {
             BMCWEB_LOG_ERROR
                 << "getInventoryItemAssociations respHandler DBus error " << ec;
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             return;
         }
 
@@ -2009,7 +2015,7 @@
                 {
                     BMCWEB_LOG_ERROR
                         << "getInventoryLedData respHandler DBus error " << ec;
-                    messages::internalError(sensorsAsyncResp->res);
+                    messages::internalError(sensorsAsyncResp->asyncResp->res);
                     return;
                 }
 
@@ -2106,7 +2112,7 @@
         BMCWEB_LOG_DEBUG << "getInventoryLeds respHandler enter";
         if (ec)
         {
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             BMCWEB_LOG_ERROR << "getInventoryLeds respHandler DBus error "
                              << ec;
             return;
@@ -2205,7 +2211,7 @@
         {
             BMCWEB_LOG_ERROR
                 << "getPowerSupplyAttributesData respHandler DBus error " << ec;
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             return;
         }
 
@@ -2292,7 +2298,7 @@
         BMCWEB_LOG_DEBUG << "getPowerSupplyAttributes respHandler enter";
         if (ec)
         {
-            messages::internalError(sensorsAsyncResp->res);
+            messages::internalError(sensorsAsyncResp->asyncResp->res);
             BMCWEB_LOG_ERROR
                 << "getPowerSupplyAttributes respHandler DBus error " << ec;
             return;
@@ -2535,7 +2541,7 @@
             if (ec)
             {
                 BMCWEB_LOG_ERROR << "getManagedObjectsCb DBUS error: " << ec;
-                messages::internalError(sensorsAsyncResp->res);
+                messages::internalError(sensorsAsyncResp->asyncResp->res);
                 return;
             }
             // Go through all objects and update response with sensor data
@@ -2580,11 +2586,11 @@
 
                 if (sensorSchema == sensors::node::sensors)
                 {
-                    sensorsAsyncResp->res.jsonValue["@odata.id"] =
+                    sensorsAsyncResp->asyncResp->res.jsonValue["@odata.id"] =
                         "/redfish/v1/Chassis/" + sensorsAsyncResp->chassisId +
                         "/" + sensorsAsyncResp->chassisSubNode + "/" +
                         sensorName;
-                    sensorJson = &(sensorsAsyncResp->res.jsonValue);
+                    sensorJson = &(sensorsAsyncResp->asyncResp->res.jsonValue);
                 }
                 else
                 {
@@ -2627,7 +2633,7 @@
                     }
 
                     nlohmann::json& tempArray =
-                        sensorsAsyncResp->res.jsonValue[fieldName];
+                        sensorsAsyncResp->asyncResp->res.jsonValue[fieldName];
                     if (fieldName == "PowerControl")
                     {
                         if (tempArray.empty())
@@ -2760,7 +2766,8 @@
             processSensorList(sensorsAsyncResp, sensorNames);
             BMCWEB_LOG_DEBUG << "getChassisCb exit";
         };
-    sensorsAsyncResp->res.jsonValue["Redundancy"] = nlohmann::json::array();
+    sensorsAsyncResp->asyncResp->res.jsonValue["Redundancy"] =
+        nlohmann::json::array();
 
     // Get set of sensors in chassis
     getChassis(sensorsAsyncResp, std::move(getChassisCb));
@@ -2801,7 +2808,7 @@
 /**
  * @brief Entry point for overriding sensor values of given sensor
  *
- * @param res   response object
+ * @param sensorAsyncResp   response object
  * @param allCollections   Collections extract from sensors' request patch info
  * @param chassisSubNode   Chassis Node for which the query has to happen
  */
@@ -2833,8 +2840,9 @@
         }
         for (auto& item : collectionItems.second)
         {
-            if (!json_util::readJson(item, sensorAsyncResp->res, "MemberId",
-                                     memberId, propertyValueName, value))
+            if (!json_util::readJson(item, sensorAsyncResp->asyncResp->res,
+                                     "MemberId", memberId, propertyValueName,
+                                     value))
             {
                 return;
             }
@@ -2859,7 +2867,7 @@
                                                *sensorNames))
             {
                 BMCWEB_LOG_INFO << "Unable to find memberId " << item.first;
-                messages::resourceNotFound(sensorAsyncResp->res,
+                messages::resourceNotFound(sensorAsyncResp->asyncResp->res,
                                            item.second.second, item.first);
                 return;
             }
@@ -2877,7 +2885,7 @@
                         << objectsWithConnection.size() << " requested "
                         << overrideMap.size() << "\n";
                     messages::resourceNotFound(
-                        sensorAsyncResp->res,
+                        sensorAsyncResp->asyncResp->res,
                         sensorAsyncResp->chassisSubNode ==
                                 sensors::node::thermal
                             ? "Temperatures"
@@ -2891,7 +2899,8 @@
                     std::string sensorName = path.filename();
                     if (sensorName.empty())
                     {
-                        messages::internalError(sensorAsyncResp->res);
+                        messages::internalError(
+                            sensorAsyncResp->asyncResp->res);
                         return;
                     }
 
@@ -2900,7 +2909,8 @@
                     {
                         BMCWEB_LOG_INFO << "Unable to find sensor object"
                                         << item.first << "\n";
-                        messages::internalError(sensorAsyncResp->res);
+                        messages::internalError(
+                            sensorAsyncResp->asyncResp->res);
                         return;
                     }
                     crow::connections::systemBus->async_method_call(
@@ -2910,7 +2920,8 @@
                                 BMCWEB_LOG_DEBUG
                                     << "setOverrideValueStatus DBUS error: "
                                     << ec;
-                                messages::internalError(sensorAsyncResp->res);
+                                messages::internalError(
+                                    sensorAsyncResp->asyncResp->res);
                                 return;
                             }
                         },
@@ -2952,7 +2963,7 @@
  * @brief Entry point for Checking the manufacturing mode before doing sensor
  * override values of given sensor
  *
- * @param res   response object
+ * @param sensorAsyncResp   response object
  * @param allCollections   Collections extract from sensors' request patch info
  * @param chassisSubNode   Chassis Node for which the query has to happen
  */
@@ -2975,7 +2986,7 @@
                 BMCWEB_LOG_DEBUG
                     << "Error in querying GetSubTree with Object Mapper. "
                     << ec2;
-                messages::internalError(sensorAsyncResp->res);
+                messages::internalError(sensorAsyncResp->asyncResp->res);
                 return;
             }
 #ifdef BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE
@@ -2989,7 +3000,7 @@
                 BMCWEB_LOG_WARNING
                     << "Overriding sensor value is not allowed - Internal "
                        "error in querying SpecialMode property.";
-                messages::internalError(sensorAsyncResp->res);
+                messages::internalError(sensorAsyncResp->asyncResp->res);
                 return;
             }
             const std::string& path = resp[0].first;
@@ -2999,7 +3010,7 @@
             {
                 BMCWEB_LOG_DEBUG
                     << "Path or service name is returned as empty. ";
-                messages::internalError(sensorAsyncResp->res);
+                messages::internalError(sensorAsyncResp->asyncResp->res);
                 return;
             }
 
@@ -3013,7 +3024,8 @@
                     {
                         BMCWEB_LOG_DEBUG
                             << "Error in querying Special mode property " << ec;
-                        messages::internalError(sensorAsyncResp->res);
+                        messages::internalError(
+                            sensorAsyncResp->asyncResp->res);
                         return;
                     }
 
@@ -3024,7 +3036,8 @@
                     {
                         BMCWEB_LOG_DEBUG << "Sensor override mode is not "
                                             "Enabled. Returning ... ";
-                        messages::internalError(sensorAsyncResp->res);
+                        messages::internalError(
+                            sensorAsyncResp->asyncResp->res);
                         return;
                     }
 
@@ -3041,7 +3054,7 @@
                                "Override the sensor value. ";
 
                         messages::actionNotSupported(
-                            sensorAsyncResp->res,
+                            sensorAsyncResp->asyncResp->res,
                             "Overriding of Sensor Value for non "
                             "manufacturing mode");
                         return;
@@ -3079,8 +3092,8 @@
         mapComplete(boost::beast::http::status::bad_request, {});
         return;
     }
-
-    auto respBuffer = std::make_shared<crow::Response>();
+    crow::Response res;
+    auto respBuffer = std::make_shared<bmcweb::AsyncResp>(res);
     auto callback =
         [respBuffer, mapCompleteCb{std::move(mapComplete)}](
             const boost::beast::http::status status,
@@ -3088,7 +3101,7 @@
                 uriToDbus) { mapCompleteCb(status, uriToDbus); };
 
     auto resp = std::make_shared<SensorsAsyncResp>(
-        *respBuffer, chassis, pathIt->second, node, std::move(callback));
+        respBuffer, chassis, pathIt->second, node, std::move(callback));
     getChassisData(resp);
 }
 
@@ -3108,22 +3121,24 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         BMCWEB_LOG_DEBUG << "SensorCollection doGet enter";
         if (params.size() != 1)
         {
             BMCWEB_LOG_DEBUG << "SensorCollection doGet param size < 1";
-            messages::internalError(res);
-            res.end();
+            messages::internalError(aResp->res);
+
             return;
         }
 
         const std::string& chassisId = params[0];
         std::shared_ptr<SensorsAsyncResp> asyncResp =
             std::make_shared<SensorsAsyncResp>(
-                res, chassisId, sensors::dbus::paths.at(sensors::node::sensors),
+                aResp, chassisId,
+                sensors::dbus::paths.at(sensors::node::sensors),
                 sensors::node::sensors);
 
         auto getChassisCb =
@@ -3133,7 +3148,7 @@
                 BMCWEB_LOG_DEBUG << "getChassisCb enter";
 
                 nlohmann::json& entriesArray =
-                    asyncResp->res.jsonValue["Members"];
+                    asyncResp->asyncResp->res.jsonValue["Members"];
                 for (auto& sensor : *sensorNames)
                 {
                     BMCWEB_LOG_DEBUG << "Adding sensor: " << sensor;
@@ -3143,7 +3158,7 @@
                     if (sensorName.empty())
                     {
                         BMCWEB_LOG_ERROR << "Invalid sensor path: " << sensor;
-                        messages::internalError(asyncResp->res);
+                        messages::internalError(asyncResp->asyncResp->res);
                         return;
                     }
                     entriesArray.push_back(
@@ -3152,7 +3167,7 @@
                               asyncResp->chassisSubNode + "/" + sensorName}});
                 }
 
-                asyncResp->res.jsonValue["Members@odata.count"] =
+                asyncResp->asyncResp->res.jsonValue["Members@odata.count"] =
                     entriesArray.size();
                 BMCWEB_LOG_DEBUG << "getChassisCb exit";
             };
@@ -3180,20 +3195,21 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         BMCWEB_LOG_DEBUG << "Sensor doGet enter";
         if (params.size() != 2)
         {
             BMCWEB_LOG_DEBUG << "Sensor doGet param size < 2";
-            messages::internalError(res);
-            res.end();
+            messages::internalError(aResp->res);
+
             return;
         }
         const std::string& chassisId = params[0];
         std::shared_ptr<SensorsAsyncResp> asyncResp =
-            std::make_shared<SensorsAsyncResp>(res, chassisId,
+            std::make_shared<SensorsAsyncResp>(aResp, chassisId,
                                                std::vector<const char*>(),
                                                sensors::node::sensors);
 
@@ -3209,7 +3225,7 @@
                 BMCWEB_LOG_DEBUG << "respHandler1 enter";
                 if (ec)
                 {
-                    messages::internalError(asyncResp->res);
+                    messages::internalError(asyncResp->asyncResp->res);
                     BMCWEB_LOG_ERROR << "Sensor getSensorPaths resp_handler: "
                                      << "Dbus error " << ec;
                     return;
@@ -3239,8 +3255,8 @@
                 {
                     BMCWEB_LOG_ERROR << "Could not find path for sensor: "
                                      << sensorName;
-                    messages::resourceNotFound(asyncResp->res, "Sensor",
-                                               sensorName);
+                    messages::resourceNotFound(asyncResp->asyncResp->res,
+                                               "Sensor", sensorName);
                     return;
                 }
                 std::string_view sensorPath = (*it).first;
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp
index 3df5ec5..06f9c84 100644
--- a/redfish-core/lib/service_root.hpp
+++ b/redfish-core/lib/service_root.hpp
@@ -38,39 +38,45 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#ServiceRoot.v1_5_0.ServiceRoot";
-        res.jsonValue["@odata.id"] = "/redfish/v1";
-        res.jsonValue["Id"] = "RootService";
-        res.jsonValue["Name"] = "Root Service";
-        res.jsonValue["RedfishVersion"] = "1.9.0";
-        res.jsonValue["Links"]["Sessions"] = {
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#ServiceRoot.v1_5_0.ServiceRoot";
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1";
+        asyncResp->res.jsonValue["Id"] = "RootService";
+        asyncResp->res.jsonValue["Name"] = "Root Service";
+        asyncResp->res.jsonValue["RedfishVersion"] = "1.9.0";
+        asyncResp->res.jsonValue["Links"]["Sessions"] = {
             {"@odata.id", "/redfish/v1/SessionService/Sessions"}};
-        res.jsonValue["AccountService"] = {
+        asyncResp->res.jsonValue["AccountService"] = {
             {"@odata.id", "/redfish/v1/AccountService"}};
-        res.jsonValue["Chassis"] = {{"@odata.id", "/redfish/v1/Chassis"}};
-        res.jsonValue["JsonSchemas"] = {
+        asyncResp->res.jsonValue["Chassis"] = {
+            {"@odata.id", "/redfish/v1/Chassis"}};
+        asyncResp->res.jsonValue["JsonSchemas"] = {
             {"@odata.id", "/redfish/v1/JsonSchemas"}};
-        res.jsonValue["Managers"] = {{"@odata.id", "/redfish/v1/Managers"}};
-        res.jsonValue["SessionService"] = {
+        asyncResp->res.jsonValue["Managers"] = {
+            {"@odata.id", "/redfish/v1/Managers"}};
+        asyncResp->res.jsonValue["SessionService"] = {
             {"@odata.id", "/redfish/v1/SessionService"}};
-        res.jsonValue["Managers"] = {{"@odata.id", "/redfish/v1/Managers"}};
-        res.jsonValue["Systems"] = {{"@odata.id", "/redfish/v1/Systems"}};
-        res.jsonValue["Registries"] = {{"@odata.id", "/redfish/v1/Registries"}};
+        asyncResp->res.jsonValue["Managers"] = {
+            {"@odata.id", "/redfish/v1/Managers"}};
+        asyncResp->res.jsonValue["Systems"] = {
+            {"@odata.id", "/redfish/v1/Systems"}};
+        asyncResp->res.jsonValue["Registries"] = {
+            {"@odata.id", "/redfish/v1/Registries"}};
 
-        res.jsonValue["UpdateService"] = {
+        asyncResp->res.jsonValue["UpdateService"] = {
             {"@odata.id", "/redfish/v1/UpdateService"}};
-        res.jsonValue["UUID"] = uuid;
-        res.jsonValue["CertificateService"] = {
+        asyncResp->res.jsonValue["UUID"] = uuid;
+        asyncResp->res.jsonValue["CertificateService"] = {
             {"@odata.id", "/redfish/v1/CertificateService"}};
-        res.jsonValue["Tasks"] = {{"@odata.id", "/redfish/v1/TaskService"}};
-        res.jsonValue["EventService"] = {
+        asyncResp->res.jsonValue["Tasks"] = {
+            {"@odata.id", "/redfish/v1/TaskService"}};
+        asyncResp->res.jsonValue["EventService"] = {
             {"@odata.id", "/redfish/v1/EventService"}};
-        res.jsonValue["TelemetryService"] = {
+        asyncResp->res.jsonValue["TelemetryService"] = {
             {"@odata.id", "/redfish/v1/TelemetryService"}};
-        res.end();
     }
 
     std::string uuid;
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 7167503..c2651d5 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -38,16 +38,17 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#StorageCollection.StorageCollection";
-        res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system/Storage";
-        res.jsonValue["Name"] = "Storage Collection";
-        res.jsonValue["Members"] = {
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#StorageCollection.StorageCollection";
+        asyncResp->res.jsonValue["@odata.id"] =
+            "/redfish/v1/Systems/system/Storage";
+        asyncResp->res.jsonValue["Name"] = "Storage Collection";
+        asyncResp->res.jsonValue["Members"] = {
             {{"@odata.id", "/redfish/v1/Systems/system/Storage/1"}}};
-        res.jsonValue["Members@odata.count"] = 1;
-        res.end();
+        asyncResp->res.jsonValue["Members@odata.count"] = 1;
     }
 };
 
@@ -66,16 +67,16 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#Storage.v1_7_1.Storage";
-        res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system/Storage/1";
-        res.jsonValue["Name"] = "Storage";
-        res.jsonValue["Id"] = "1";
-        res.jsonValue["Status"]["State"] = "Enabled";
+        asyncResp->res.jsonValue["@odata.type"] = "#Storage.v1_7_1.Storage";
+        asyncResp->res.jsonValue["@odata.id"] =
+            "/redfish/v1/Systems/system/Storage/1";
+        asyncResp->res.jsonValue["Name"] = "Storage";
+        asyncResp->res.jsonValue["Id"] = "1";
+        asyncResp->res.jsonValue["Status"]["State"] = "Enabled";
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         auto health = std::make_shared<HealthPopulate>(asyncResp);
         health->populate();
 
@@ -289,10 +290,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -345,8 +346,9 @@
                 }
 
                 getMainChassisId(
-                    asyncResp, [](const std::string& chassisId,
-                                  const std::shared_ptr<AsyncResp>& aRsp) {
+                    asyncResp,
+                    [](const std::string& chassisId,
+                       const std::shared_ptr<bmcweb::AsyncResp>& aRsp) {
                         aRsp->res.jsonValue["Links"]["Chassis"] = {
                             {"@odata.id", "/redfish/v1/Chassis/" + chassisId}};
                     });
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 91da523..f97dba2 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -38,8 +38,9 @@
  *
  * @return None.
  */
-inline void updateDimmProperties(const std::shared_ptr<AsyncResp>& aResp,
-                                 const std::variant<bool>& dimmState)
+inline void
+    updateDimmProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                         const std::variant<bool>& dimmState)
 {
     const bool* isDimmFunctional = std::get_if<bool>(&dimmState);
     if (isDimmFunctional == nullptr)
@@ -72,8 +73,9 @@
  *
  * @return None.
  */
-inline void modifyCpuPresenceState(const std::shared_ptr<AsyncResp>& aResp,
-                                   const std::variant<bool>& cpuPresenceState)
+inline void
+    modifyCpuPresenceState(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                           const std::variant<bool>& cpuPresenceState)
 {
     const bool* isCpuPresent = std::get_if<bool>(&cpuPresenceState);
 
@@ -108,7 +110,7 @@
  * @return None.
  */
 inline void
-    modifyCpuFunctionalState(const std::shared_ptr<AsyncResp>& aResp,
+    modifyCpuFunctionalState(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                              const std::variant<bool>& cpuFunctionalState)
 {
     const bool* isCpuFunctional = std::get_if<bool>(&cpuFunctionalState);
@@ -145,7 +147,7 @@
  * @return None.
  */
 inline void
-    getComputerSystem(const std::shared_ptr<AsyncResp>& aResp,
+    getComputerSystem(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                       const std::shared_ptr<HealthPopulate>& systemHealth)
 {
     BMCWEB_LOG_DEBUG << "Get available system components.";
@@ -613,7 +615,7 @@
  *
  * @return None.
  */
-inline void getHostState(const std::shared_ptr<AsyncResp>& aResp)
+inline void getHostState(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get host information.";
     crow::connections::systemBus->async_method_call(
@@ -741,7 +743,7 @@
  *
  * @return Integer error code.
  */
-inline int assignBootParameters(const std::shared_ptr<AsyncResp>& aResp,
+inline int assignBootParameters(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                                 const std::string& rfSource,
                                 std::string& bootSource, std::string& bootMode)
 {
@@ -799,7 +801,7 @@
  *
  * @return None.
  */
-inline void getBootProgress(const std::shared_ptr<AsyncResp>& aResp)
+inline void getBootProgress(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     crow::connections::systemBus->async_method_call(
         [aResp](const boost::system::error_code ec,
@@ -902,7 +904,7 @@
  *
  * @return None.
  */
-inline void getBootMode(const std::shared_ptr<AsyncResp>& aResp,
+inline void getBootMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                         const std::string& bootDbusObj)
 {
     crow::connections::systemBus->async_method_call(
@@ -966,7 +968,7 @@
  *
  * @return None.
  */
-inline void getBootSource(const std::shared_ptr<AsyncResp>& aResp,
+inline void getBootSource(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                           bool oneTimeEnabled)
 {
     std::string bootDbusObj =
@@ -1018,7 +1020,7 @@
  *
  * @return None.
  */
-inline void getBootProperties(const std::shared_ptr<AsyncResp>& aResp)
+inline void getBootProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get boot information.";
 
@@ -1059,7 +1061,7 @@
  *
  * @return None.
  */
-inline void getLastResetTime(const std::shared_ptr<AsyncResp>& aResp)
+inline void getLastResetTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Getting System Last Reset Time";
 
@@ -1102,7 +1104,7 @@
  *
  * @return None.
  */
-inline void getAutomaticRetry(const std::shared_ptr<AsyncResp>& aResp)
+inline void getAutomaticRetry(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get Automatic Retry policy";
 
@@ -1193,7 +1195,8 @@
  *
  * @return None.
  */
-inline void getPowerRestorePolicy(const std::shared_ptr<AsyncResp>& aResp)
+inline void
+    getPowerRestorePolicy(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get power restore policy";
 
@@ -1252,7 +1255,7 @@
  *
  * @return Integer error code.
  */
-inline void setBootModeOrSource(std::shared_ptr<AsyncResp> aResp,
+inline void setBootModeOrSource(std::shared_ptr<bmcweb::AsyncResp> aResp,
                                 bool oneTimeEnabled,
                                 const std::optional<std::string>& bootSource,
                                 const std::optional<std::string>& bootEnable)
@@ -1373,9 +1376,10 @@
  *
  * @return Integer error code.
  */
-inline void setBootSourceProperties(const std::shared_ptr<AsyncResp>& aResp,
-                                    std::optional<std::string> bootSource,
-                                    std::optional<std::string> bootEnable)
+inline void
+    setBootSourceProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                            std::optional<std::string> bootSource,
+                            std::optional<std::string> bootEnable)
 {
     BMCWEB_LOG_DEBUG << "Set boot information.";
 
@@ -1416,7 +1420,7 @@
  *
  * @return None.
  */
-inline void setAssetTag(const std::shared_ptr<AsyncResp>& aResp,
+inline void setAssetTag(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                         const std::string& assetTag)
 {
     crow::connections::systemBus->async_method_call(
@@ -1493,7 +1497,7 @@
  *
  * @return None.
  */
-inline void setAutomaticRetry(const std::shared_ptr<AsyncResp>& aResp,
+inline void setAutomaticRetry(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                               const std::string& automaticRetryConfig)
 {
     BMCWEB_LOG_DEBUG << "Set Automatic Retry.";
@@ -1542,8 +1546,9 @@
  *
  * @return None.
  */
-inline void setPowerRestorePolicy(const std::shared_ptr<AsyncResp>& aResp,
-                                  const std::string& policy)
+inline void
+    setPowerRestorePolicy(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                          const std::string& policy)
 {
     BMCWEB_LOG_DEBUG << "Set power restore policy.";
 
@@ -1590,7 +1595,7 @@
  *
  * @return None.
  */
-inline void getProvisioningStatus(std::shared_ptr<AsyncResp> aResp)
+inline void getProvisioningStatus(std::shared_ptr<bmcweb::AsyncResp> aResp)
 {
     BMCWEB_LOG_DEBUG << "Get OEM information.";
     crow::connections::systemBus->async_method_call(
@@ -1723,7 +1728,8 @@
  *
  * @return None.
  */
-inline void getHostWatchdogTimer(const std::shared_ptr<AsyncResp>& aResp)
+inline void
+    getHostWatchdogTimer(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     BMCWEB_LOG_DEBUG << "Get host watchodg";
     crow::connections::systemBus->async_method_call(
@@ -1794,7 +1800,7 @@
  *
  * @return None.
  */
-inline void setWDTProperties(const std::shared_ptr<AsyncResp>& aResp,
+inline void setWDTProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                              const std::optional<bool> wdtEnable,
                              const std::optional<std::string>& wdtTimeOutAction)
 {
@@ -1867,18 +1873,18 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request& req,
                const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#ComputerSystemCollection.ComputerSystemCollection";
-        res.jsonValue["@odata.id"] = "/redfish/v1/Systems";
-        res.jsonValue["Name"] = "Computer System Collection";
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Systems";
+        asyncResp->res.jsonValue["Name"] = "Computer System Collection";
 
         crow::connections::systemBus->async_method_call(
-            [asyncResp](const boost::system::error_code ec,
-                        const std::variant<std::string>& /*hostName*/) {
+            [asyncResp, &req](const boost::system::error_code ec,
+                              const std::variant<std::string>& /*hostName*/) {
                 nlohmann::json& ifaceArray =
                     asyncResp->res.jsonValue["Members"];
                 ifaceArray = nlohmann::json::array();
@@ -1892,7 +1898,6 @@
                     ifaceArray.push_back(
                         {{"@odata.id", "/redfish/v1/Systems/hypervisor"}});
                     count = ifaceArray.size();
-                    return;
                 }
             },
             "xyz.openbmc_project.Settings",
@@ -1921,13 +1926,13 @@
      * Function handles POST method request.
      * Analyzes POST body message before sends Reset request data to D-Bus.
      */
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         std::string resetType;
-        if (!json_util::readJson(req, res, "ResetType", resetType))
+        if (!json_util::readJson(req, asyncResp->res, "ResetType", resetType))
         {
             return;
         }
@@ -1974,7 +1979,8 @@
         }
         else
         {
-            messages::actionParameterUnknown(res, "Reset", resetType);
+            messages::actionParameterUnknown(asyncResp->res, "Reset",
+                                             resetType);
             return;
         }
 
@@ -2034,7 +2040,7 @@
     /**
      * Function transceives data with dbus directly.
      */
-    void doNMI(const std::shared_ptr<AsyncResp>& asyncResp)
+    void doNMI(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
     {
         constexpr char const* serviceName =
             "xyz.openbmc_project.Control.Host.NMI";
@@ -2082,48 +2088,50 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] = "#ComputerSystem.v1_13_0.ComputerSystem";
-        res.jsonValue["Name"] = "system";
-        res.jsonValue["Id"] = "system";
-        res.jsonValue["SystemType"] = "Physical";
-        res.jsonValue["Description"] = "Computer System";
-        res.jsonValue["ProcessorSummary"]["Count"] = 0;
-        res.jsonValue["ProcessorSummary"]["Status"]["State"] = "Disabled";
-        res.jsonValue["MemorySummary"]["TotalSystemMemoryGiB"] = uint64_t(0);
-        res.jsonValue["MemorySummary"]["Status"]["State"] = "Disabled";
-        res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system";
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#ComputerSystem.v1_13_0.ComputerSystem";
+        asyncResp->res.jsonValue["Name"] = "system";
+        asyncResp->res.jsonValue["Id"] = "system";
+        asyncResp->res.jsonValue["SystemType"] = "Physical";
+        asyncResp->res.jsonValue["Description"] = "Computer System";
+        asyncResp->res.jsonValue["ProcessorSummary"]["Count"] = 0;
+        asyncResp->res.jsonValue["ProcessorSummary"]["Status"]["State"] =
+            "Disabled";
+        asyncResp->res.jsonValue["MemorySummary"]["TotalSystemMemoryGiB"] =
+            uint64_t(0);
+        asyncResp->res.jsonValue["MemorySummary"]["Status"]["State"] =
+            "Disabled";
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system";
 
-        res.jsonValue["Processors"] = {
+        asyncResp->res.jsonValue["Processors"] = {
             {"@odata.id", "/redfish/v1/Systems/system/Processors"}};
-        res.jsonValue["Memory"] = {
+        asyncResp->res.jsonValue["Memory"] = {
             {"@odata.id", "/redfish/v1/Systems/system/Memory"}};
-        res.jsonValue["Storage"] = {
+        asyncResp->res.jsonValue["Storage"] = {
             {"@odata.id", "/redfish/v1/Systems/system/Storage"}};
 
-        res.jsonValue["Actions"]["#ComputerSystem.Reset"] = {
+        asyncResp->res.jsonValue["Actions"]["#ComputerSystem.Reset"] = {
             {"target",
              "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"},
             {"@Redfish.ActionInfo",
              "/redfish/v1/Systems/system/ResetActionInfo"}};
 
-        res.jsonValue["LogServices"] = {
+        asyncResp->res.jsonValue["LogServices"] = {
             {"@odata.id", "/redfish/v1/Systems/system/LogServices"}};
 
-        res.jsonValue["Bios"] = {
+        asyncResp->res.jsonValue["Bios"] = {
             {"@odata.id", "/redfish/v1/Systems/system/Bios"}};
 
-        res.jsonValue["Links"]["ManagedBy"] = {
+        asyncResp->res.jsonValue["Links"]["ManagedBy"] = {
             {{"@odata.id", "/redfish/v1/Managers/bmc"}}};
 
-        res.jsonValue["Status"] = {
+        asyncResp->res.jsonValue["Status"] = {
             {"Health", "OK"},
             {"State", "Enabled"},
         };
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         constexpr const std::array<const char*, 4> inventoryForSystems = {
             "xyz.openbmc_project.Inventory.Item.Dimm",
             "xyz.openbmc_project.Inventory.Item.Cpu",
@@ -2149,11 +2157,12 @@
 
         health->populate();
 
-        getMainChassisId(asyncResp, [](const std::string& chassisId,
-                                       const std::shared_ptr<AsyncResp>& aRsp) {
-            aRsp->res.jsonValue["Links"]["Chassis"] = {
-                {{"@odata.id", "/redfish/v1/Chassis/" + chassisId}}};
-        });
+        getMainChassisId(
+            asyncResp, [](const std::string& chassisId,
+                          const std::shared_ptr<bmcweb::AsyncResp>& aRsp) {
+                aRsp->res.jsonValue["Links"]["Chassis"] = {
+                    {{"@odata.id", "/redfish/v1/Chassis/" + chassisId}}};
+            });
 
         getLocationIndicatorActive(asyncResp);
         // TODO (Gunnar): Remove IndicatorLED after enough time has passed
@@ -2172,7 +2181,8 @@
 #endif
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>&) override
     {
         std::optional<bool> locationIndicatorActive;
@@ -2181,10 +2191,9 @@
         std::optional<nlohmann::json> wdtTimerProps;
         std::optional<std::string> assetTag;
         std::optional<std::string> powerRestorePolicy;
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         if (!json_util::readJson(
-                req, res, "IndicatorLED", indicatorLed,
+                req, asyncResp->res, "IndicatorLED", indicatorLed,
                 "LocationIndicatorActive", locationIndicatorActive, "Boot",
                 bootProps, "WatchdogTimer", wdtTimerProps, "PowerRestorePolicy",
                 powerRestorePolicy, "AssetTag", assetTag))
@@ -2192,7 +2201,7 @@
             return;
         }
 
-        res.result(boost::beast::http::status::no_content);
+        asyncResp->res.result(boost::beast::http::status::no_content);
 
         if (assetTag)
         {
@@ -2246,9 +2255,9 @@
         if (indicatorLed)
         {
             setIndicatorLedState(asyncResp, *indicatorLed);
-            res.addHeader(boost::beast::http::field::warning,
-                          "299 - \"IndicatorLED is deprecated. Use "
-                          "LocationIndicatorActive instead.\"");
+            asyncResp->res.addHeader(boost::beast::http::field::warning,
+                                     "299 - \"IndicatorLED is deprecated. Use "
+                                     "LocationIndicatorActive instead.\"");
         }
 
         if (powerRestorePolicy)
@@ -2284,10 +2293,10 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue = {
+        asyncResp->res.jsonValue = {
             {"@odata.type", "#ActionInfo.v1_1_2.ActionInfo"},
             {"@odata.id", "/redfish/v1/Systems/system/ResetActionInfo"},
             {"Name", "Reset Action Info"},
@@ -2299,7 +2308,6 @@
                {"AllowableValues",
                 {"On", "ForceOff", "ForceOn", "ForceRestart", "GracefulRestart",
                  "GracefulShutdown", "PowerCycle", "Nmi"}}}}}};
-        res.end();
     }
 };
 } // namespace redfish
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index dbc6278..275806f 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -331,10 +331,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -387,10 +388,11 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         if (params.size() != 1)
         {
             messages::internalError(asyncResp->res);
@@ -469,10 +471,10 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
+
         asyncResp->res.jsonValue["@odata.type"] =
             "#TaskCollection.TaskCollection";
         asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/TaskService/Tasks";
@@ -509,10 +511,9 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         asyncResp->res.jsonValue["@odata.type"] =
             "#TaskService.v1_1_4.TaskService";
         asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/TaskService";
diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp
index 61ca891..9ec0737 100644
--- a/redfish-core/lib/telemetry_service.hpp
+++ b/redfish-core/lib/telemetry_service.hpp
@@ -23,21 +23,20 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#TelemetryService.v1_2_1.TelemetryService";
-        res.jsonValue["@odata.id"] = "/redfish/v1/TelemetryService";
-        res.jsonValue["Id"] = "TelemetryService";
-        res.jsonValue["Name"] = "Telemetry Service";
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/TelemetryService";
+        asyncResp->res.jsonValue["Id"] = "TelemetryService";
+        asyncResp->res.jsonValue["Name"] = "Telemetry Service";
 
-        res.jsonValue["MetricReportDefinitions"]["@odata.id"] =
+        asyncResp->res.jsonValue["MetricReportDefinitions"]["@odata.id"] =
             "/redfish/v1/TelemetryService/MetricReportDefinitions";
-        res.jsonValue["MetricReports"]["@odata.id"] =
+        asyncResp->res.jsonValue["MetricReports"]["@odata.id"] =
             "/redfish/v1/TelemetryService/MetricReports";
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
         crow::connections::systemBus->async_method_call(
             [asyncResp](
                 const boost::system::error_code ec,
diff --git a/redfish-core/lib/thermal.hpp b/redfish-core/lib/thermal.hpp
index 00acdf9..af31831 100644
--- a/redfish-core/lib/thermal.hpp
+++ b/redfish-core/lib/thermal.hpp
@@ -37,30 +37,33 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
+
             return;
         }
         const std::string& chassisName = params[0];
         auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::paths.at(sensors::node::thermal),
+            asyncResp, chassisName,
+            sensors::dbus::paths.at(sensors::node::thermal),
             sensors::node::thermal);
 
         // TODO Need to get Chassis Redundancy information.
         getChassisData(sensorAsyncResp);
     }
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>& params) override
     {
         if (params.size() != 1)
         {
-            res.end();
-            messages::internalError(res);
+
+            messages::internalError(asyncResp->res);
             return;
         }
 
@@ -70,20 +73,21 @@
         std::unordered_map<std::string, std::vector<nlohmann::json>>
             allCollections;
 
-        auto asyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::paths.at(sensors::node::thermal),
+        auto sensorsAsyncResp = std::make_shared<SensorsAsyncResp>(
+            asyncResp, chassisName,
+            sensors::dbus::paths.at(sensors::node::thermal),
             sensors::node::thermal);
 
-        if (!json_util::readJson(req, asyncResp->res, "Temperatures",
-                                 temperatureCollections, "Fans",
+        if (!json_util::readJson(req, sensorsAsyncResp->asyncResp->res,
+                                 "Temperatures", temperatureCollections, "Fans",
                                  fanCollections))
         {
             return;
         }
         if (!temperatureCollections && !fanCollections)
         {
-            messages::resourceNotFound(asyncResp->res, "Thermal",
-                                       "Temperatures / Voltages");
+            messages::resourceNotFound(sensorsAsyncResp->asyncResp->res,
+                                       "Thermal", "Temperatures / Voltages");
             return;
         }
         if (temperatureCollections)
@@ -96,7 +100,7 @@
             allCollections.emplace("Fans", *std::move(fanCollections));
         }
 
-        checkAndDoSensorsOverride(asyncResp, allCollections);
+        checkAndDoSensorsOverride(sensorsAsyncResp, allCollections);
     }
 };
 
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 18b2db0..ca1234f 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -60,9 +60,10 @@
 
 // Note that asyncResp can be either a valid pointer or nullptr. If nullptr
 // then no asyncResp updates will occur
-static void softwareInterfaceAdded(const std::shared_ptr<AsyncResp>& asyncResp,
-                                   sdbusplus::message::message& m,
-                                   const crow::Request& req)
+static void
+    softwareInterfaceAdded(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                           sdbusplus::message::message& m,
+                           const crow::Request& req)
 {
     std::vector<std::pair<
         std::string,
@@ -256,8 +257,9 @@
 // Note that asyncResp can be either a valid pointer or nullptr. If nullptr
 // then no asyncResp updates will occur
 static void monitorForSoftwareAvailable(
-    const std::shared_ptr<AsyncResp>& asyncResp, const crow::Request& req,
-    const std::string& url, int timeoutTimeSeconds = 10)
+    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+    const crow::Request& req, const std::string& url,
+    int timeoutTimeSeconds = 10)
 {
     // Only allow one FW update at a time
     if (fwUpdateInProgress != false)
@@ -398,12 +400,12 @@
     }
 
   private:
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         std::optional<std::string> transferProtocol;
         std::string imageURI;
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
 
         BMCWEB_LOG_DEBUG << "Enter UpdateService.SimpleUpdate doPost";
 
@@ -526,24 +528,24 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> aResp = std::make_shared<AsyncResp>(res);
-        res.jsonValue["@odata.type"] = "#UpdateService.v1_4_0.UpdateService";
-        res.jsonValue["@odata.id"] = "/redfish/v1/UpdateService";
-        res.jsonValue["Id"] = "UpdateService";
-        res.jsonValue["Description"] = "Service for Software Update";
-        res.jsonValue["Name"] = "Update Service";
-        res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService";
+        asyncResp->res.jsonValue["@odata.type"] =
+            "#UpdateService.v1_4_0.UpdateService";
+        asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/UpdateService";
+        asyncResp->res.jsonValue["Id"] = "UpdateService";
+        asyncResp->res.jsonValue["Description"] = "Service for Software Update";
+        asyncResp->res.jsonValue["Name"] = "Update Service";
+        asyncResp->res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService";
         // UpdateService cannot be disabled
-        res.jsonValue["ServiceEnabled"] = true;
-        res.jsonValue["FirmwareInventory"] = {
+        asyncResp->res.jsonValue["ServiceEnabled"] = true;
+        asyncResp->res.jsonValue["FirmwareInventory"] = {
             {"@odata.id", "/redfish/v1/UpdateService/FirmwareInventory"}};
 #ifdef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE
         // Update Actions object.
         nlohmann::json& updateSvcSimpleUpdate =
-            res.jsonValue["Actions"]["#UpdateService.SimpleUpdate"];
+            asyncResp->res.jsonValue["Actions"]["#UpdateService.SimpleUpdate"];
         updateSvcSimpleUpdate["target"] =
             "/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate";
         updateSvcSimpleUpdate["TransferProtocol@Redfish.AllowableValues"] = {
@@ -551,12 +553,12 @@
 #endif
         // Get the current ApplyTime value
         crow::connections::systemBus->async_method_call(
-            [aResp](const boost::system::error_code ec,
-                    const std::variant<std::string>& applyTime) {
+            [asyncResp](const boost::system::error_code ec,
+                        const std::variant<std::string>& applyTime) {
                 if (ec)
                 {
                     BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-                    messages::internalError(aResp->res);
+                    messages::internalError(asyncResp->res);
                     return;
                 }
 
@@ -569,16 +571,16 @@
                 if (*s == "xyz.openbmc_project.Software.ApplyTime."
                           "RequestedApplyTimes.Immediate")
                 {
-                    aResp->res.jsonValue["HttpPushUriOptions"]
-                                        ["HttpPushUriApplyTime"]["ApplyTime"] =
-                        "Immediate";
+                    asyncResp->res
+                        .jsonValue["HttpPushUriOptions"]["HttpPushUriApplyTime"]
+                                  ["ApplyTime"] = "Immediate";
                 }
                 else if (*s == "xyz.openbmc_project.Software.ApplyTime."
                                "RequestedApplyTimes.OnReset")
                 {
-                    aResp->res.jsonValue["HttpPushUriOptions"]
-                                        ["HttpPushUriApplyTime"]["ApplyTime"] =
-                        "OnReset";
+                    asyncResp->res
+                        .jsonValue["HttpPushUriOptions"]["HttpPushUriApplyTime"]
+                                  ["ApplyTime"] = "OnReset";
                 }
             },
             "xyz.openbmc_project.Settings",
@@ -587,15 +589,14 @@
             "xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime");
     }
 
-    void doPatch(crow::Response& res, const crow::Request& req,
+    void doPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                 const crow::Request& req,
                  const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "doPatch...";
 
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-
         std::optional<nlohmann::json> pushUriOptions;
-        if (!json_util::readJson(req, res, "HttpPushUriOptions",
+        if (!json_util::readJson(req, asyncResp->res, "HttpPushUriOptions",
                                  pushUriOptions))
         {
             return;
@@ -604,7 +605,7 @@
         if (pushUriOptions)
         {
             std::optional<nlohmann::json> pushUriApplyTime;
-            if (!json_util::readJson(*pushUriOptions, res,
+            if (!json_util::readJson(*pushUriOptions, asyncResp->res,
                                      "HttpPushUriApplyTime", pushUriApplyTime))
             {
                 return;
@@ -613,8 +614,8 @@
             if (pushUriApplyTime)
             {
                 std::optional<std::string> applyTime;
-                if (!json_util::readJson(*pushUriApplyTime, res, "ApplyTime",
-                                         applyTime))
+                if (!json_util::readJson(*pushUriApplyTime, asyncResp->res,
+                                         "ApplyTime", applyTime))
                 {
                     return;
                 }
@@ -667,13 +668,12 @@
         }
     }
 
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "doPost...";
 
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-
         // Setup callback for when new software detected
         monitorForSoftwareAvailable(asyncResp, req,
                                     "/redfish/v1/UpdateService");
@@ -706,15 +706,14 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request&,
-               const std::vector<std::string>&) override
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&, const std::vector<std::string>&) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#SoftwareInventoryCollection.SoftwareInventoryCollection";
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/UpdateService/FirmwareInventory";
-        res.jsonValue["Name"] = "Software Inventory Collection";
+        asyncResp->res.jsonValue["Name"] = "Software Inventory Collection";
 
         crow::connections::systemBus->async_method_call(
             [asyncResp](
@@ -782,7 +781,7 @@
 
   private:
     /* Fill related item links (i.e. bmc, bios) in for inventory */
-    static void getRelatedItems(const std::shared_ptr<AsyncResp>& aResp,
+    static void getRelatedItems(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                                 const std::string& purpose)
     {
         if (purpose == fw_util::bmcPurpose)
@@ -804,22 +803,21 @@
         }
     }
 
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
-
         if (params.size() != 1)
         {
-            messages::internalError(res);
-            res.end();
+            messages::internalError(asyncResp->res);
+
             return;
         }
 
         std::shared_ptr<std::string> swId =
             std::make_shared<std::string>(params[0]);
 
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/UpdateService/FirmwareInventory/" + *swId;
 
         crow::connections::systemBus->async_method_call(
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index e969778..9667c71 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -54,8 +54,9 @@
 /**
  * @brief Read all known properties from VM object interfaces
  */
-static void vmParseInterfaceObject(const DbusInterfaceType& interface,
-                                   const std::shared_ptr<AsyncResp>& aResp)
+static void
+    vmParseInterfaceObject(const DbusInterfaceType& interface,
+                           const std::shared_ptr<bmcweb::AsyncResp>& aResp)
 {
     const auto mountPointIface =
         interface.find("xyz.openbmc_project.VirtualMedia.MountPoint");
@@ -184,7 +185,7 @@
 /**
  *  @brief Fills collection data
  */
-static void getVmResourceList(std::shared_ptr<AsyncResp> aResp,
+static void getVmResourceList(std::shared_ptr<bmcweb::AsyncResp> aResp,
                               const std::string& service,
                               const std::string& name)
 {
@@ -223,7 +224,7 @@
 /**
  *  @brief Fills data for specific resource
  */
-static void getVmData(const std::shared_ptr<AsyncResp>& aResp,
+static void getVmData(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                       const std::string& service, const std::string& name,
                       const std::string& resName)
 {
@@ -394,7 +395,8 @@
      * @brief Function validate parameters of insert media request.
      *
      */
-    bool validateParams(crow::Response& res, std::string& imageUrl,
+    bool validateParams(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                        std::string& imageUrl,
                         const std::optional<bool>& inserted,
                         const std::optional<std::string>& transferMethod,
                         const std::optional<std::string>& transferProtocolType)
@@ -405,7 +407,8 @@
         {
             BMCWEB_LOG_ERROR << "Request action parameter Image is empty.";
 
-            messages::propertyValueFormatError(res, "<empty>", "Image");
+            messages::propertyValueFormatError(asyncResp->res, "<empty>",
+                                               "Image");
 
             return false;
         }
@@ -416,7 +419,7 @@
             BMCWEB_LOG_ERROR
                 << "Request action optional parameter Inserted must be true.";
 
-            messages::actionParameterNotSupported(res, "Inserted",
+            messages::actionParameterNotSupported(asyncResp->res, "Inserted",
                                                   "InsertMedia");
 
             return false;
@@ -428,8 +431,8 @@
             BMCWEB_LOG_ERROR << "Request action optional parameter "
                                 "TransferMethod must be Stream.";
 
-            messages::actionParameterNotSupported(res, "TransferMethod",
-                                                  "InsertMedia");
+            messages::actionParameterNotSupported(
+                asyncResp->res, "TransferMethod", "InsertMedia");
 
             return false;
         }
@@ -447,7 +450,7 @@
                                 "contain specified protocol type from list: "
                                 "(smb, https).";
 
-            messages::resourceAtUriInUnknownFormat(res, imageUrl);
+            messages::resourceAtUriInUnknownFormat(asyncResp->res, imageUrl);
 
             return false;
         }
@@ -459,8 +462,8 @@
                                 "must be provided with value from list: "
                                 "(CIFS, HTTPS).";
 
-            messages::propertyValueNotInList(res, *transferProtocolType,
-                                             "TransferProtocolType");
+            messages::propertyValueNotInList(
+                asyncResp->res, *transferProtocolType, "TransferProtocolType");
             return false;
         }
 
@@ -472,7 +475,7 @@
                                 "contain specified protocol type or param "
                                 "TransferProtocolType must be provided.";
 
-            messages::resourceAtUriInUnknownFormat(res, imageUrl);
+            messages::resourceAtUriInUnknownFormat(asyncResp->res, imageUrl);
 
             return false;
         }
@@ -490,8 +493,8 @@
                                     "provided with param imageUrl.";
 
                 messages::actionParameterValueTypeError(
-                    res, *transferProtocolType, "TransferProtocolType",
-                    "InsertMedia");
+                    asyncResp->res, *transferProtocolType,
+                    "TransferProtocolType", "InsertMedia");
 
                 return false;
             }
@@ -513,14 +516,13 @@
      *
      * Analyzes POST body message before sends Reset request data to dbus.
      */
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>& params) override
     {
-        auto aResp = std::make_shared<AsyncResp>(res);
-
         if (params.size() != 2)
         {
-            messages::internalError(res);
+            messages::internalError(asyncResp->res);
             return;
         }
 
@@ -529,20 +531,21 @@
 
         if (params[0] != "bmc")
         {
-            messages::resourceNotFound(res, "VirtualMedia.Insert", resName);
+            messages::resourceNotFound(asyncResp->res, "VirtualMedia.Insert",
+                                       resName);
 
             return;
         }
 
         crow::connections::systemBus->async_method_call(
-            [this, aResp{std::move(aResp)}, req,
+            [this, asyncResp, req,
              resName](const boost::system::error_code ec,
                       const GetObjectType& getObjectType) {
                 if (ec)
                 {
                     BMCWEB_LOG_ERROR << "ObjectMapper::GetObject call failed: "
                                      << ec;
-                    messages::internalError(aResp->res);
+                    messages::internalError(asyncResp->res);
 
                     return;
                 }
@@ -551,8 +554,8 @@
 
                 crow::connections::systemBus->async_method_call(
                     [this, service, resName, req,
-                     aResp{aResp}](const boost::system::error_code ec,
-                                   ManagedObjectType& subtree) {
+                     asyncResp](const boost::system::error_code ec,
+                                ManagedObjectType& subtree) {
                         if (ec)
                         {
                             BMCWEB_LOG_DEBUG << "DBUS response error";
@@ -582,8 +585,8 @@
                                     BMCWEB_LOG_DEBUG << "InsertMedia not "
                                                         "allowed in proxy mode";
                                     messages::resourceNotFound(
-                                        aResp->res, "VirtualMedia.InsertMedia",
-                                        resName);
+                                        asyncResp->res,
+                                        "VirtualMedia.InsertMedia", resName);
 
                                     return;
                                 }
@@ -605,7 +608,7 @@
 
                                 // Read obligatory parameters (url of image)
                                 if (!json_util::readJson(
-                                        req, aResp->res, "Image", imageUrl,
+                                        req, asyncResp->res, "Image", imageUrl,
                                         "WriteProtected", writeProtected,
                                         "UserName", userName, "Password",
                                         password, "Inserted", inserted,
@@ -618,7 +621,7 @@
                                 }
 
                                 bool paramsValid = validateParams(
-                                    aResp->res, imageUrl, inserted,
+                                    asyncResp->res, imageUrl, inserted,
                                     transferMethod, transferProtocolType);
 
                                 if (paramsValid == false)
@@ -628,7 +631,7 @@
 
                                 // manager is irrelevant for VirtualMedia dbus
                                 // calls
-                                doMountVmLegacy(aResp, service, resName,
+                                doMountVmLegacy(asyncResp, service, resName,
                                                 imageUrl, !(*writeProtected),
                                                 std::move(*userName),
                                                 std::move(*password));
@@ -637,8 +640,8 @@
                             }
                         }
                         BMCWEB_LOG_DEBUG << "Parent item not found";
-                        messages::resourceNotFound(aResp->res, "VirtualMedia",
-                                                   resName);
+                        messages::resourceNotFound(asyncResp->res,
+                                                   "VirtualMedia", resName);
                     },
                     service, "/xyz/openbmc_project/VirtualMedia",
                     "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
@@ -796,7 +799,7 @@
      *
      * All BMC state properties will be retrieved before sending reset request.
      */
-    void doMountVmLegacy(const std::shared_ptr<AsyncResp>& asyncResp,
+    void doMountVmLegacy(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                          const std::string& service, const std::string& name,
                          const std::string& imageUrl, const bool rw,
                          std::string&& userName, std::string&& password)
@@ -895,14 +898,13 @@
      *
      * Analyzes POST body message before sends Reset request data to dbus.
      */
-    void doPost(crow::Response& res, const crow::Request& req,
+    void doPost(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+                const crow::Request& req,
                 const std::vector<std::string>& params) override
     {
-        auto aResp = std::make_shared<AsyncResp>(res);
-
         if (params.size() != 2)
         {
-            messages::internalError(res);
+            messages::internalError(asyncResp->res);
             return;
         }
 
@@ -911,20 +913,21 @@
 
         if (params[0] != "bmc")
         {
-            messages::resourceNotFound(res, "VirtualMedia.Eject", resName);
+            messages::resourceNotFound(asyncResp->res, "VirtualMedia.Eject",
+                                       resName);
 
             return;
         }
 
         crow::connections::systemBus->async_method_call(
-            [this, aResp{std::move(aResp)}, req,
+            [this, asyncResp{std::move(asyncResp)}, req,
              resName](const boost::system::error_code ec,
                       const GetObjectType& getObjectType) {
                 if (ec)
                 {
                     BMCWEB_LOG_ERROR << "ObjectMapper::GetObject call failed: "
                                      << ec;
-                    messages::internalError(aResp->res);
+                    messages::internalError(asyncResp->res);
 
                     return;
                 }
@@ -933,8 +936,8 @@
 
                 crow::connections::systemBus->async_method_call(
                     [this, resName, service, req,
-                     aResp{aResp}](const boost::system::error_code ec,
-                                   ManagedObjectType& subtree) {
+                     asyncResp{asyncResp}](const boost::system::error_code ec,
+                                           ManagedObjectType& subtree) {
                         if (ec)
                         {
                             BMCWEB_LOG_DEBUG << "DBUS response error";
@@ -961,22 +964,24 @@
                                 if (lastIndex != std::string::npos)
                                 {
                                     // Proxy mode
-                                    doVmAction(aResp, service, resName, false);
+                                    doVmAction(asyncResp, service, resName,
+                                               false);
                                 }
 
                                 lastIndex = path.rfind("Legacy");
                                 if (lastIndex != std::string::npos)
                                 {
                                     // Legacy mode
-                                    doVmAction(aResp, service, resName, true);
+                                    doVmAction(asyncResp, service, resName,
+                                               true);
                                 }
 
                                 return;
                             }
                         }
                         BMCWEB_LOG_DEBUG << "Parent item not found";
-                        messages::resourceNotFound(aResp->res, "VirtualMedia",
-                                                   resName);
+                        messages::resourceNotFound(asyncResp->res,
+                                                   "VirtualMedia", resName);
                     },
                     service, "/xyz/openbmc_project/VirtualMedia",
                     "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
@@ -992,7 +997,7 @@
      *
      * All BMC state properties will be retrieved before sending reset request.
      */
-    void doVmAction(const std::shared_ptr<AsyncResp>& asyncResp,
+    void doVmAction(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                     const std::string& service, const std::string& name,
                     bool legacy)
     {
@@ -1053,16 +1058,16 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
-        auto asyncResp = std::make_shared<AsyncResp>(res);
 
         // Check if there is required param, truly entering this shall be
         // impossible
         if (params.size() != 1)
         {
-            messages::internalError(res);
+            messages::internalError(asyncResp->res);
 
             return;
         }
@@ -1076,10 +1081,10 @@
             return;
         }
 
-        res.jsonValue["@odata.type"] =
+        asyncResp->res.jsonValue["@odata.type"] =
             "#VirtualMediaCollection.VirtualMediaCollection";
-        res.jsonValue["Name"] = "Virtual Media Services";
-        res.jsonValue["@odata.id"] =
+        asyncResp->res.jsonValue["Name"] = "Virtual Media Services";
+        asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Managers/" + name + "/VirtualMedia";
 
         crow::connections::systemBus->async_method_call(
@@ -1128,23 +1133,20 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request&,
+    void doGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+               const crow::Request&,
                const std::vector<std::string>& params) override
     {
         // Check if there is required param, truly entering this shall be
         // impossible
         if (params.size() != 2)
         {
-            messages::internalError(res);
-
-            res.end();
+            messages::internalError(asyncResp->res);
             return;
         }
         const std::string& name = params[0];
         const std::string& resName = params[1];
 
-        auto asyncResp = std::make_shared<AsyncResp>(res);
-
         if (name != "bmc")
         {
             messages::resourceNotFound(asyncResp->res, "VirtualMedia", resName);