blob: d7f581914266e946b51c49f56cf77b285c0a7c9f [file] [log] [blame]
#pragma once
#include "http_response.hpp"
#include <functional>
namespace bmcweb
{
/**
* AsyncResp
* Gathers data needed for response processing after async calls are done
*/
class AsyncResp
{
public:
AsyncResp() = default;
explicit AsyncResp(crow::Response&& resIn) : res(std::move(resIn))
{}
AsyncResp(const AsyncResp&) = delete;
AsyncResp(AsyncResp&&) = delete;
AsyncResp& operator=(const AsyncResp&) = delete;
AsyncResp& operator=(AsyncResp&&) = delete;
~AsyncResp()
{
res.end();
}
crow::Response res;
};
} // namespace bmcweb