19 #ifndef __gtk_ardour_http_h__
20 #define __gtk_ardour_http_h__
22 #include <curl/curl.h>
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 (
_curl, s, l);
61 char*
unescape (
const char* s,
int l,
int *o)
const {
62 return curl_easy_unescape (
_curl, s, l, o);
67 void free (
void *p)
const {
96 char*
http_get (
const char* url,
int* status,
bool with_error_logging);
97 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)