diff options
author | Egor Pugin <egor.pugin@gmail.com> | 2018-07-04 19:11:03 +0300 |
---|---|---|
committer | Egor Pugin <egor.pugin@gmail.com> | 2018-07-04 19:11:03 +0300 |
commit | 95f86f4ce18e65d45894d5a130c4bdaf8ecbaac5 (patch) | |
tree | 0235eaef9d2dcd9725c1eb9d24c8de0201ba6fcc /include/tgbot/Bot.h | |
parent | 7f388398bbcff916f5507770af727ef9ad59f33d (diff) |
Implement CurlHttpClient.
Diffstat (limited to 'include/tgbot/Bot.h')
-rw-r--r-- | include/tgbot/Bot.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/tgbot/Bot.h b/include/tgbot/Bot.h index 8dd4c16..9bca05f 100644 --- a/include/tgbot/Bot.h +++ b/include/tgbot/Bot.h @@ -28,6 +28,7 @@ #include "tgbot/Api.h" #include "tgbot/EventBroadcaster.h" #include "tgbot/EventHandler.h" +#include "tgbot/net/HttpClient.h" namespace TgBot { @@ -39,7 +40,8 @@ namespace TgBot { class Bot { public: - explicit Bot(const std::string& token) : _token(token), _api(token), _eventHandler(&_eventBroadcaster) { + explicit Bot(const std::string& token, const HttpClient &httpClientDriver = BoostHttpClient::getInstance()) + : _token(token), _api(token, httpClientDriver), _eventHandler(&_eventBroadcaster), _httpClientDriver(httpClientDriver) { } /** @@ -75,6 +77,7 @@ private: const Api _api; EventBroadcaster _eventBroadcaster; const EventHandler _eventHandler; + const HttpClient &_httpClientDriver; }; } |