#ifndef MBGL_STORAGE_HTTP_REQUEST_BASE #define MBGL_STORAGE_HTTP_REQUEST_BASE #include #include #include #include #include #include namespace mbgl { class Response; class HTTPRequestBase : private util::noncopyable { public: using Callback = std::function; HTTPRequestBase(const Resource& resource_, Callback notify_) : resource(resource_) , notify(std::move(notify_)) , cancelled(false) { } virtual ~HTTPRequestBase() = default; virtual void cancel() { cancelled = true; }; protected: static optional parseCacheControl(const char *value); Resource resource; Callback notify; bool cancelled; }; } // namespace mbgl #endif // MBGL_STORAGE_HTTP_REQUEST_BASE