blob: 6d2480ebf36d1475ee5315c02a21c104340ddb62 [file] [log] [blame]
Ed Tanous911ac312017-08-15 09:37:42 -07001#pragma once
2
Ed Tanous04e438c2020-10-03 08:06:26 -07003#include <app.hpp>
Ed Tanousa8c4ce92021-03-24 08:44:51 -07004#include <http_request.hpp>
5#include <http_response.hpp>
6#include <rf_async_resp.hpp>
7
8#include <string>
Ed Tanous1abe55e2018-09-05 08:30:59 -07009
Ed Tanous1abe55e2018-09-05 08:30:59 -070010namespace redfish
11{
Ed Tanousa8c4ce92021-03-24 08:44:51 -070012
Ed Tanous23a21a12020-07-25 04:45:05 +000013inline void requestRoutes(App& app)
Ed Tanous1abe55e2018-09-05 08:30:59 -070014{
15 BMCWEB_ROUTE(app, "/redfish/")
Ed Tanousb41187f2019-10-24 16:30:02 -070016 .methods(boost::beast::http::verb::get)(
zhanghch058d1b46d2021-04-01 11:18:24 +080017 [](const crow::Request&,
18 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
19 asyncResp->res.jsonValue = {{"v1", "/redfish/v1/"}};
Ed Tanous1abe55e2018-09-05 08:30:59 -070020 });
Ed Tanous3dac7492017-08-02 13:46:20 -070021}
Ed Tanous1abe55e2018-09-05 08:30:59 -070022} // namespace redfish