#include #include "HTTPFileReader.h" HTTPFileReader HTTPFileReader::instance(protocol); void HTTPFileReader::open(const std::string url) { _res = cpr::Get(cpr::Url{url}); } void HTTPFileReader::close() { } const std::string HTTPFileReader::read() { return _res.text.data(); } HTTPFileReader::~HTTPFileReader() { this->close(); } HTTPFileReader * HTTPFileReader::clone() const { return new HTTPFileReader(this); } HTTPFileReader::HTTPFileReader(const HTTPFileReader *) : FileReader() { }