tgbot-cpp
Loading...
Searching...
No Matches
HttpReqArg.h
Go to the documentation of this file.
1
#ifndef TGBOT_HTTPPARAMETER_H
2
#define TGBOT_HTTPPARAMETER_H
3
4
#include "
tgbot/export.h
"
5
6
#include <boost/lexical_cast.hpp>
7
8
#include <string>
9
#include <vector>
10
#include <functional>
11
12
namespace
TgBot
{
13
19
class
TGBOT_API
HttpReqArg
{
20
21
public
:
22
template
<
typename
T>
23
HttpReqArg
(std::string
name
,
const
T&
value
,
bool
isFile
=
false
, std::string
mimeType
=
"text/plain"
, std::string
fileName
=
""
) :
24
name
(std::move(
name
)),
value
(boost::lexical_cast<std::string>(
value
)),
isFile
(
isFile
),
mimeType
(std::move(
mimeType
)),
fileName
(std::move(
fileName
))
25
{
26
}
27
31
std::string
name
;
32
36
std::string
value
;
37
41
bool
isFile
=
false
;
42
46
std::string
mimeType
=
"text/plain"
;
47
51
std::string
fileName
;
52
};
53
54
}
55
56
57
#endif
//TGBOT_HTTPPARAMETER_H
TgBot::HttpReqArg::mimeType
std::string mimeType
Mime type of an argument value. This field makes sense only if isFile is true.
Definition
HttpReqArg.h:46
TgBot::HttpReqArg::name
std::string name
Name of an argument.
Definition
HttpReqArg.h:31
TgBot::HttpReqArg::isFile
bool isFile
Should be true if an argument value hold some file contents.
Definition
HttpReqArg.h:41
TgBot::HttpReqArg::HttpReqArg
HttpReqArg(std::string name, const T &value, bool isFile=false, std::string mimeType="text/plain", std::string fileName="")
Definition
HttpReqArg.h:23
TgBot::HttpReqArg::value
std::string value
Value of an argument.
Definition
HttpReqArg.h:36
TgBot::HttpReqArg::fileName
std::string fileName
Should be set if an argument value hold some file contents.
Definition
HttpReqArg.h:51
export.h
TgBot
Definition
Api.h:40
include
tgbot
net
HttpReqArg.h
Generated on
for tgbot-cpp by
1.14.0