summaryrefslogtreecommitdiff
path: root/src/mbgl/util/http_header.hpp
blob: 1dc8498de09dcf91a18f0f878d9d254881d1272e (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
#ifndef MBGL_UTIL_HTTP_HEADER
#define MBGL_UTIL_HTTP_HEADER

#include <mbgl/util/optional.hpp>
#include <mbgl/util/chrono.hpp>

#include <string>

namespace mbgl {
namespace http {

class CacheControl {
public:
    static CacheControl parse(const std::string&);

    optional<uint64_t> maxAge;
    bool mustRevalidate = false;

    optional<SystemTimePoint> toTimePoint() const;
};

} // namespace http
} // namespace mbgl

#endif