xxtelebot  1.4.1.0
A simple Telegram Bot implementation in C++
Classes | Typedefs | Functions
tgbot::utils::http Namespace Reference

HTTP utilities, meant for project internal usage. More...

Classes

struct  value
 

Typedefs

using PostForms = std::unordered_map< const char *, value >
 

Functions

void __internal_Curl_GlobalInit ()
 
std::string get (CURL *c, const std::string &full)
 Very easy HTTP GET request using curl (see also: curlEasyInit() ) More...
 
std::string multiPartUpload (CURL *c, const std::string &full, PostForms const &forms)
 Multi part upload utils. More...
 
CURL * curlEasyInit ()
 Initialize CURL. More...
 

Detailed Description

HTTP utilities, meant for project internal usage.

Function Documentation

CURL* tgbot::utils::http::curlEasyInit ( )

Initialize CURL.

Returns
new CURL instance
std::string tgbot::utils::http::get ( CURL *  c,
const std::string &  full 
)

Very easy HTTP GET request using curl (see also: curlEasyInit() )

Parameters
c: curl instance
full: complete URL
Returns
HTTP response body
std::string tgbot::utils::http::multiPartUpload ( CURL *  c,
const std::string &  full,
PostForms const &  forms 
)

Multi part upload utils.

Parameters
c: curl instance
full: complete URL
forms: see PostForms
Returns
HTTP response body