diff options
author | Ed Tanous <edtanous@google.com> | 2021-03-24 18:44:51 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2021-04-01 23:55:34 +0300 |
commit | a8c4ce95bd2f4fee4544a57ed86ace3e257c9f24 (patch) | |
tree | 22f883a8e0f1871c5b8db3fda150a858dc81b47c /include/redfish_v1.hpp | |
parent | 0c15c33e0ed36ffedf4905aa671cddbcdcc3d04d (diff) | |
download | bmcweb-a8c4ce95bd2f4fee4544a57ed86ace3e257c9f24.tar.xz |
Move requestRoutes to asyncResp
res.end() should be avoided where possible; This commit changes
requestRoutes to remove the res.end() that's been present there for a
long time.
Tested:
curl -vvvv --insecure --user root:0penBmc https://192.168.7.2/redfish/v1
returns 200
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I798783d320cfb7bc7973a8d2c02c4a25906a3859
Diffstat (limited to 'include/redfish_v1.hpp')
-rw-r--r-- | include/redfish_v1.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/redfish_v1.hpp b/include/redfish_v1.hpp index 7a88cbaa14..76ff457721 100644 --- a/include/redfish_v1.hpp +++ b/include/redfish_v1.hpp @@ -1,16 +1,23 @@ #pragma once #include <app.hpp> +#include <http_request.hpp> +#include <http_response.hpp> +#include <rf_async_resp.hpp> + +#include <string> namespace redfish { + inline void requestRoutes(App& app) { BMCWEB_ROUTE(app, "/redfish/") .methods(boost::beast::http::verb::get)( [](const crow::Request&, crow::Response& res) { + std::shared_ptr<AsyncResp> asyncResp = + std::make_shared<AsyncResp>(res); res.jsonValue = {{"v1", "/redfish/v1/"}}; - res.end(); }); } } // namespace redfish |