21 #include <curl/curl.h>
39 std::map<std::string, std::string>
h;
42 char*
get (
const char* url,
bool with_error_logging =
false);
44 std::string
get (
const std::string& url,
bool with_error_logging =
false) {
45 char *rv =
get (url.c_str (), with_error_logging);
46 return rv ? std::string (rv) : std::string (
"");
54 std::map<std::string, std::string>
header ()
const {
return nfo.
h; }
56 char*
escape (
const char* s,
int l)
const {
57 return curl_easy_escape (
_curl, s, l);
60 char*
unescape (
const char* s,
int l,
int *o)
const {
61 return curl_easy_unescape (
_curl, s, l, o);
66 void free (
void *p)
const {
95 char*
http_get (
const char* url,
int* status,
bool with_error_logging);
96 std::string
http_get (
const std::string& url,
bool with_error_logging);
static void setup_certificate_paths()
char * unescape(const char *s, int l, int *o) const
std::string error() const
HttpGet(bool persist=false, bool ssl=true)
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)
static const char * ca_info
std::map< std::string, std::string > header() const
char error_buffer[CURL_ERROR_SIZE]
char * escape(const char *s, int l) const
static const char * ca_path
char * http_get(const char *url, int *status, bool with_error_logging)