xref: /openbmc/bmcweb/include/async_resp.hpp (revision 4cee35e7)
1 #pragma once
2 
3 #include "http_response.hpp"
4 
5 #include <functional>
6 
7 namespace bmcweb
8 {
9 
10 /**
11  * AsyncResp
12  * Gathers data needed for response processing after async calls are done
13  */
14 
15 class AsyncResp
16 {
17   public:
18     AsyncResp() = default;
19 
20     AsyncResp(const AsyncResp&) = delete;
21     AsyncResp(AsyncResp&&) = delete;
22     AsyncResp& operator=(const AsyncResp&) = delete;
23     AsyncResp& operator=(AsyncResp&&) = delete;
24 
25     ~AsyncResp()
26     {
27         res.end();
28     }
29 
30     crow::Response res;
31 };
32 
33 } // namespace bmcweb
34