1 #pragma once 2 3 #include <app.hpp> 4 #include <http_request.hpp> 5 #include <http_response.hpp> 6 7 #include <string> 8 9 namespace redfish 10 { 11 12 inline void redfishGet(App& app, const crow::Request& req, 13 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) 14 { 15 if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) 16 { 17 return; 18 } 19 asyncResp->res.jsonValue["v1"] = "/redfish/v1/"; 20 } 21 22 inline void requestRoutes(App& app) 23 { 24 BMCWEB_ROUTE(app, "/redfish/") 25 .methods(boost::beast::http::verb::get)( 26 std::bind_front(redfishGet, std::ref(app))); 27 } 28 } // namespace redfish 29