diff options
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; }; } |