Allow to query HTTP headers
[ardour.git] / gtk2_ardour / ardour_http.h
index 06cf46f408751851827455363a7152330292189d..aa6b9f3936658aba6119e3af6ca9727258974c3e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <curl/curl.h>
 #include <string>
+#include <map>
 
 namespace ArdourCurl {
 
@@ -35,6 +36,10 @@ class HttpGet {
                size_t size;
        };
 
+       struct HeaderInfo {
+               std::map<std::string, std::string> h;
+       };
+
        char* get (const char* url);
 
        std::string get (const std::string& url) {
@@ -47,6 +52,8 @@ class HttpGet {
 
        long int status () const { return _status; }
 
+       std::map<std::string, std::string> header () const { return nfo.h; }
+
        char* escape (const char* s, int l) const {
                return curl_easy_escape (_curl, s, l);
        }
@@ -76,6 +83,7 @@ class HttpGet {
        char error_buffer[CURL_ERROR_SIZE];
 
        struct MemStruct mem;
+       struct HeaderInfo nfo;
 
        static const char* ca_path;
        static const char* ca_info;