From d8289105193707daede1a5b59137f18e20f20aeb Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 15:48:14 +0200 Subject: (2/2) rename --- HTTPFileReader.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 HTTPFileReader.h (limited to 'HTTPFileReader.h') 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 + +#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; +}; + -- cgit v1.2.3