summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_http.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-09-16 01:39:04 +0200
committerRobin Gareus <robin@gareus.org>2016-09-16 01:39:04 +0200
commit0996656eccceccccc4eea7ec74bfe60559ee2fff (patch)
tree12a3e4901e1202b5de3f8b149796b8384739fa3c /gtk2_ardour/ardour_http.h
parent4042c234b141fca03c44a315228b3715f114141d (diff)
Allow to query HTTP headers
Diffstat (limited to 'gtk2_ardour/ardour_http.h')
-rw-r--r--gtk2_ardour/ardour_http.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_http.h b/gtk2_ardour/ardour_http.h
index 06cf46f408..aa6b9f3936 100644
--- a/gtk2_ardour/ardour_http.h
+++ b/gtk2_ardour/ardour_http.h
@@ -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;