diff options
author | Oleg Morozenkov <omorozenkov@gmail.com> | 2015-09-10 18:28:53 +0300 |
---|---|---|
committer | Oleg Morozenkov <omorozenkov@gmail.com> | 2015-09-10 18:28:53 +0300 |
commit | 370df9853702bf9666b8dfa2e4254b9e236b2789 (patch) | |
tree | a46258645f3647431c60379335d217445a22ab81 /include/tgbot/net/HttpReqArg.h | |
parent | 8bd7f5e0b167763d6b63782913348b1068bc4896 (diff) | |
parent | 6bb048c991a52c0b974bd4a316579f0a622a70ec (diff) |
Merge pull request #5 from ray-pixar/master
Bug fix: now bot can parse messages correctly + Fix for Sending files
Diffstat (limited to 'include/tgbot/net/HttpReqArg.h')
-rw-r--r-- | include/tgbot/net/HttpReqArg.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/tgbot/net/HttpReqArg.h b/include/tgbot/net/HttpReqArg.h index 65f4f52..683c2b0 100644 --- a/include/tgbot/net/HttpReqArg.h +++ b/include/tgbot/net/HttpReqArg.h @@ -37,8 +37,8 @@ class HttpReqArg { public: template<typename T> - HttpReqArg(const std::string& name, const T& value, bool isFile = false, const std::string& mimeType = "text/plain") : - name(name), value(boost::lexical_cast<std::string>(value)), isFile(isFile), mimeType(mimeType) + HttpReqArg(const std::string& name, const T& value, bool isFile = false, const std::string& mimeType = "text/plain", std::string fileName = "") : + name(name), value(boost::lexical_cast<std::string>(value)), isFile(isFile), mimeType(mimeType), fileName(fileName) { } @@ -61,6 +61,11 @@ public: * Mime type of an argument value. This field makes sense only if isFile is true. */ std::string mimeType = "text/plain"; + + /** + * Should be set if an argument value hold some file contents + */ + std::string fileName; }; } |