tgbot-cpp
TgBot::HttpParser Class Reference

#include <HttpParser.h>

Public Member Functions

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 parseRequest (const std::string &data, std::unordered_map< std::string, std::string > &headers)
 
std::string parseRequest (const std::string &data)
 
std::string parseResponse (const std::string &data, std::unordered_map< std::string, std::string > &headers)
 
std::string parseResponse (const std::string &data)
 

Static Public Member Functions

static HttpParsergetInstance ()
 

Detailed Description

Definition at line 35 of file HttpParser.h.

Member Function Documentation

std::string TgBot::HttpParser::generateMultipartBoundary ( const std::vector< HttpReqArg > &  args)
std::string TgBot::HttpParser::generateMultipartFormData ( const std::vector< HttpReqArg > &  args,
const std::string &  bondary 
)
std::string TgBot::HttpParser::generateRequest ( const Url url,
const std::vector< HttpReqArg > &  args,
bool  isKeepAlive = false 
)
std::string TgBot::HttpParser::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 TgBot::HttpParser::generateWwwFormUrlencoded ( const std::vector< HttpReqArg > &  args)
static HttpParser& TgBot::HttpParser::getInstance ( )
static
std::string TgBot::HttpParser::parseRequest ( const std::string &  data,
std::unordered_map< std::string, std::string > &  headers 
)
inline

Definition at line 46 of file HttpParser.h.

std::string TgBot::HttpParser::parseRequest ( const std::string &  data)
inline

Definition at line 50 of file HttpParser.h.

std::string TgBot::HttpParser::parseResponse ( const std::string &  data,
std::unordered_map< std::string, std::string > &  headers 
)
inline

Definition at line 54 of file HttpParser.h.

std::string TgBot::HttpParser::parseResponse ( const std::string &  data)
inline

Definition at line 58 of file HttpParser.h.


The documentation for this class was generated from the following file: