Files
MapLibreParticleLab/include/mbgl/storage/response.hpp
Konstantin Käfer 6a7334b882 [core] add support for stale responses
We're now returning stale responses from cache. Those responses will have the `stale` flag set to true. Currently, all requesters in the core code discard stale responses, and cancel the request immediately after they got a non-stale response.
2015-10-26 15:54:27 +01:00

27 lines
395 B
C++

#ifndef MBGL_STORAGE_RESPONSE
#define MBGL_STORAGE_RESPONSE
#include <string>
namespace mbgl {
class Response {
public:
bool isExpired() const;
public:
enum Status { Error, Successful, NotFound };
Status status = Error;
bool stale = false;
std::string message;
int64_t modified = 0;
int64_t expires = 0;
std::string etag;
std::string data;
};
}
#endif