1#ifndef TGBOT_HTTPPARSER_H
2#define TGBOT_HTTPPARSER_H
8#include <unordered_map>
16 std::string
generateRequest(
const Url& url,
const std::vector<HttpReqArg>& args,
bool isKeepAlive =
false)
const;
20 std::string
generateResponse(
const std::string& data,
const std::string& mimeType,
unsigned short statusCode,
const std::string& statusStr,
bool isKeepAlive)
const;
21 std::unordered_map<std::string, std::string>
parseHeader(
const std::string& data,
bool isRequest)
const;
std::unordered_map< std::string, std::string > parseHeader(const std::string &data, bool isRequest) const
std::string generateRequest(const Url &url, const std::vector< HttpReqArg > &args, bool isKeepAlive=false) const
std::string generateMultipartFormData(const std::vector< HttpReqArg > &args, const std::string &boundary) const
std::string generateMultipartBoundary(const std::vector< HttpReqArg > &args) const
std::string generateResponse(const std::string &data, const std::string &mimeType, unsigned short statusCode, const std::string &statusStr, bool isKeepAlive) const
std::string extractBody(const std::string &data) const
std::string generateWwwFormUrlencoded(const std::vector< HttpReqArg > &args) const
This class parses a string with the url.