Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 1 | #pragma once |
2 | |||||
Ed Tanous | c94ad49 | 2019-10-10 15:39:33 -0700 | [diff] [blame] | 3 | #include <app.h> |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 4 | |
5 | #include <boost/algorithm/string.hpp> | ||||
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 6 | #include <dbus_singleton.hpp> |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 7 | #include <persistent_data_middleware.hpp> |
Gunnar Mills | 1214b7e | 2020-06-04 10:11:30 -0500 | [diff] [blame] | 8 | |
9 | #include <fstream> | ||||
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 10 | #include <streambuf> |
11 | #include <string> | ||||
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 12 | namespace crow |
13 | { | ||||
14 | namespace redfish | ||||
15 | { | ||||
Gunnar Mills | 1214b7e | 2020-06-04 10:11:30 -0500 | [diff] [blame] | 16 | template <typename... Middlewares> |
17 | void requestRoutes(Crow<Middlewares...>& app) | ||||
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 18 | { |
19 | BMCWEB_ROUTE(app, "/redfish/") | ||||
Ed Tanous | b41187f | 2019-10-24 16:30:02 -0700 | [diff] [blame^] | 20 | .methods(boost::beast::http::verb::get)( |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 21 | [](const crow::Request& req, crow::Response& res) { |
22 | res.jsonValue = {{"v1", "/redfish/v1/"}}; | ||||
23 | res.end(); | ||||
24 | }); | ||||
Ed Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 25 | } |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 26 | } // namespace redfish |
27 | } // namespace crow |