summaryrefslogtreecommitdiff
path: root/src/mbgl/util/http_header.hpp
blob: b5a6403782ff5a1b03b7029b8887125537a06d26 (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<Timestamp> toTimePoint() const;
};

} // namespace http
} // namespace mbgl

#endif