blob: 8c846ae693ade67fc42ed50721366f48e4778700 [file] [log] [blame]
Rohit PAIfdf51f52025-04-04 11:12:12 +05301// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright OpenBMC Authors
3#pragma once
4
5#include "http_request.hpp"
6
7#include <boost/beast/http/verb.hpp>
8
9#include <string>
10#include <string_view>
11
12namespace redfish
13{
14
15class SubRequest
16{
17 public:
18 explicit SubRequest(const crow::Request& req) :
19 url_(req.url().encoded_path()), method_(req.method())
20 {}
21
22 std::string_view url() const
23 {
24 return url_;
25 }
26
27 boost::beast::http::verb method() const
28 {
29 return method_;
30 }
31
32 private:
33 std::string url_;
34 boost::beast::http::verb method_;
35};
36
37} // namespace redfish