aboutsummaryrefslogtreecommitdiff
path: root/HTTPFile.h
blob: 4b05e183d378baa6624b85b7877bb4da28d60d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
};