diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 15:48:14 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 15:48:14 +0200 |
commit | d8289105193707daede1a5b59137f18e20f20aeb (patch) | |
tree | 939908b9c4c6f7aaef8aa61ee2e04be3e85610b6 /HTTPFileReader.h | |
parent | 76e61d68bbf568ec0d7fc4632e52d4de5496b003 (diff) |
(2/2) rename
Diffstat (limited to 'HTTPFileReader.h')
-rw-r--r-- | HTTPFileReader.h | 29 |
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; +}; + |