This repository has been archived on 2018-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
BBB-Simple-ACS/client/request_delegate.hpp

30 lines
589 B
C++

#pragma once
#include <functional>
namespace acs
{
class http_client;
class request_delegate
{
http_client* client_ = nullptr;
static constexpr auto host = "api.cismon.net";
static constexpr auto query = "/client/1/testacsclient";
using callback_t = std::function<void(const std::pair<std::string, std::string>&)>;
callback_t callback_;
void response_handler(const std::string& response_body) const;
public:
explicit request_delegate() = default;
void execute(const callback_t& callback);
};
}