blob: 39f058b34d4eb0e8614e2357ceb50e63221c6669 (
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 "FileStrategy.h"
class HTTPFile : FileStrategy {
protected:
virtual void open(const std::string url);
public:
virtual void close();
virtual const std::string read();
public:
virtual ~HTTPFile();
private:
HTTPFile(const HTTPFile *);
virtual HTTPFile * clone() const;
private:
using FileStrategy::FileStrategy;
constexpr static const std::string protocol = "https://";
static HTTPFile instance;
private:
cpr::Response _res;
};
|