From 95f86f4ce18e65d45894d5a130c4bdaf8ecbaac5 Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Wed, 4 Jul 2018 19:11:03 +0300 Subject: Implement CurlHttpClient. --- include/tgbot/Bot.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/tgbot/Bot.h') 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; }; } -- cgit v1.2.3