restclient-cpp
C++ client for making HTTP/REST requests
|
: namespace for all helper functions More...
Classes | |
struct | UploadObject |
This structure represents the payload to upload on POST requests. More... | |
Functions | |
size_t | write_callback (void *ptr, size_t size, size_t nmemb, void *userdata) |
write callback function for libcurl More... | |
size_t | header_callback (void *ptr, size_t size, size_t nmemb, void *userdata) |
header callback for libcurl More... | |
size_t | read_callback (void *ptr, size_t size, size_t nmemb, void *userdata) |
read callback function for libcurl More... | |
: namespace for all helper functions
size_t RestClient::Helpers::header_callback | ( | void * | data, |
size_t | size, | ||
size_t | nmemb, | ||
void * | userdata | ||
) |
header callback for libcurl
data | returned (header line) |
size | of data |
nmemb | memblock |
userdata | pointer to user data object to save headr data |
size_t RestClient::Helpers::read_callback | ( | void * | data, |
size_t | size, | ||
size_t | nmemb, | ||
void * | userdata | ||
) |
read callback function for libcurl
data | pointer of max size (size*nmemb) to write data to |
size | size parameter |
nmemb | memblock parameter |
userdata | pointer to user data to read data from |
get upload struct
set correct sizes
copy data to buffer
decrement length and increment data pointer
return copied size
size_t RestClient::Helpers::write_callback | ( | void * | data, |
size_t | size, | ||
size_t | nmemb, | ||
void * | userdata | ||
) |
write callback function for libcurl
data | returned data of size (size*nmemb) |
size | size parameter |
nmemb | memblock parameter |
userdata | pointer to user data to save/work with return data |