summaryrefslogtreecommitdiff
path: root/include/tgbot/net/HttpParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tgbot/net/HttpParser.h')
-rw-r--r--include/tgbot/net/HttpParser.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/include/tgbot/net/HttpParser.h b/include/tgbot/net/HttpParser.h
index dcb857b..83068fb 100644
--- a/include/tgbot/net/HttpParser.h
+++ b/include/tgbot/net/HttpParser.h
@@ -34,33 +34,33 @@ namespace TgBot {
class HttpParser {
public:
- static HttpParser& getInstance();
+ static HttpParser& getInstance();
- std::string generateRequest(const Url& url, const std::vector<HttpReqArg>& args, bool isKeepAlive = false);
- std::string generateMultipartFormData(const std::vector<HttpReqArg>& args, const std::string& bondary);
- std::string generateMultipartBoundary(const std::vector<HttpReqArg>& args);
- std::string generateWwwFormUrlencoded(const std::vector<HttpReqArg>& args);
- std::string generateResponse(const std::string& data, const std::string& mimeType = "text/plain", short unsigned statusCode = 200, const std::string& statusStr = "OK", bool isKeepAlive = false);
+ std::string generateRequest(const Url& url, const std::vector<HttpReqArg>& args, bool isKeepAlive = false);
+ std::string generateMultipartFormData(const std::vector<HttpReqArg>& args, const std::string& bondary);
+ std::string generateMultipartBoundary(const std::vector<HttpReqArg>& args);
+ std::string generateWwwFormUrlencoded(const std::vector<HttpReqArg>& args);
+ std::string generateResponse(const std::string& data, const std::string& mimeType = "text/plain", short unsigned statusCode = 200, const std::string& statusStr = "OK", bool isKeepAlive = false);
- inline std::string parseRequest(const std::string& data, std::map<std::string, std::string>& headers) {
- return parseHttp(true, data, headers);
- }
+ inline std::string parseRequest(const std::string& data, std::map<std::string, std::string>& headers) {
+ return parseHttp(true, data, headers);
+ }
- inline std::string parseRequest(const std::string& data) {
- return parseHttp(true, data);
- }
+ inline std::string parseRequest(const std::string& data) {
+ return parseHttp(true, data);
+ }
- inline std::string parseResponse(const std::string& data, std::map<std::string, std::string>& headers) {
- return parseHttp(false, data, headers);
- }
+ inline std::string parseResponse(const std::string& data, std::map<std::string, std::string>& headers) {
+ return parseHttp(false, data, headers);
+ }
- inline std::string parseResponse(const std::string& data) {
- return parseHttp(false, data);
- }
+ inline std::string parseResponse(const std::string& data) {
+ return parseHttp(false, data);
+ }
private:
- std::string parseHttp(bool isRequest, const std::string& data, std::map<std::string, std::string>& headers);
- std::string parseHttp(bool isRequest, const std::string& data);
+ std::string parseHttp(bool isRequest, const std::string& data, std::map<std::string, std::string>& headers);
+ std::string parseHttp(bool isRequest, const std::string& data);
};
}