diff options
Diffstat (limited to 'include/mbgl/storage/response.hpp')
-rw-r--r-- | include/mbgl/storage/response.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/mbgl/storage/response.hpp b/include/mbgl/storage/response.hpp index a44902e1f9..bec1efe6b1 100644 --- a/include/mbgl/storage/response.hpp +++ b/include/mbgl/storage/response.hpp @@ -20,10 +20,14 @@ public: // When this object is empty, the response was successful. std::unique_ptr<const Error> error; + // This is set to true for 204 Not Modified responses, and, for backward compatibility, + // for 404 Not Found responses for tiles. + bool noContent = false; + // This is set to true for 304 Not Modified responses. bool notModified = false; - // The actual data of the response. This is null if notModified is true. + // The actual data of the response. Present only for non-error, non-notModified responses. std::shared_ptr<const std::string> data; optional<SystemTimePoint> modified; @@ -49,6 +53,8 @@ public: Error(Reason, const std::string& = ""); }; +std::ostream& operator<<(std::ostream&, Response::Error::Reason); + } // namespace mbgl #endif |