aboutsummaryrefslogtreecommitdiff
path: root/HTTPFileReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'HTTPFileReader.h')
-rw-r--r--HTTPFileReader.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/HTTPFileReader.h b/HTTPFileReader.h
new file mode 100644
index 0000000..4b05e18
--- /dev/null
+++ b/HTTPFileReader.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <cpr/cpr.h>
+
+#include "FileReader.h"
+
+class HTTPFileReader : FileReader {
+protected:
+ virtual void open(const std::string url);
+public:
+ virtual void close();
+ virtual const std::string read();
+
+public:
+ virtual ~HTTPFileReader();
+
+private:
+ HTTPFileReader(const HTTPFileReader *);
+ virtual HTTPFileReader * clone() const;
+
+private:
+ using FileReader::FileReader;
+ constexpr static const std::string protocol = "https://";
+ static HTTPFileReader instance;
+
+private:
+ cpr::Response _res;
+};
+