40 std::map<std::string, std::string>
h;
43 char*
get (
const char* url,
bool with_error_logging =
false);
45 std::string
get (
const std::string& url,
bool with_error_logging =
false) {
46 char *rv =
get (url.c_str (), with_error_logging);
47 return rv ? std::string (rv) : std::string (
"");
55 std::map<std::string, std::string>
header ()
const {
return nfo.
h; }
57 char*
escape (
const char* s,
int l)
const {
58 return curl_easy_escape (
_ccurl.
curl (), s, l);
61 char*
unescape (
const char* s,
int l,
int *o)
const {
62 return curl_easy_unescape (
_ccurl.
curl (), s, l, o);
67 void free (
void *p)
const {
91 char*
http_get (
const char* url,
int* status,
bool with_error_logging);
92 std::string
http_get (
const std::string& url,
bool with_error_logging);
char * unescape(const char *s, int l, int *o) const
std::string error() const
std::string get(const std::string &url, bool with_error_logging=false)
static void ca_setopt(CURL *)
char * get(const char *url, bool with_error_logging=false)
HttpGet(bool persist=false)
std::map< std::string, std::string > header() const
char error_buffer[CURL_ERROR_SIZE]
char * escape(const char *s, int l) const
char * http_get(const char *url, int *status, bool with_error_logging)