9 #ifndef INCLUDE_RESTCLIENT_CPP_HELPERS_H_
10 #define INCLUDE_RESTCLIENT_CPP_HELPERS_H_
16 #include "restclient-cpp/version.h"
53 static inline std::string <rim(std::string &s) {
54 s.erase(s.begin(), std::find_if(s.begin(), s.end(),
55 std::not1(std::ptr_fun<int, int>(std::isspace))));
60 static inline std::string &rtrim(std::string &s) {
61 s.erase(std::find_if(s.rbegin(), s.rend(),
62 std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
67 static inline std::string &trim(std::string &s) {
68 return ltrim(rtrim(s));
74 #endif // INCLUDE_RESTCLIENT_CPP_HELPERS_H_
size_t header_callback(void *ptr, size_t size, size_t nmemb, void *userdata)
header callback for libcurl
Definition: helpers.cc:41
const char * data
Definition: helpers.h:37
size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userdata)
write callback function for libcurl
Definition: helpers.cc:23
This structure represents the payload to upload on POST requests.
Definition: helpers.h:36
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userdata)
read callback function for libcurl
Definition: helpers.cc:75
size_t length
Definition: helpers.h:38
namespace for all RestClient definitions
Definition: connection.h:23