blob: a17284e78277643577e5772c12fd68999caf7286 (
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
|
#ifndef MBGL_STORAGE_HTTP_REQUEST_BASE
#define MBGL_STORAGE_HTTP_REQUEST_BASE
#include <mbgl/storage/request_base.hpp>
#include <mbgl/util/chrono.hpp>
namespace mbgl {
class HTTPRequestBase : public RequestBase {
public:
HTTPRequestBase(const std::string& url_, Callback notify_)
: RequestBase(url_, notify_)
, cancelled(false) {
}
virtual ~HTTPRequestBase() = default;
virtual void cancel() override { cancelled = true; };
protected:
static Seconds parseCacheControl(const char *value);
bool cancelled;
};
} // namespace mbgl
#endif // MBGL_STORAGE_HTTP_REQUEST_BASE
|