#ifndef CPR_ACCEPT_ENCODING_H #define CPR_ACCEPT_ENCODING_H #include #include #include #include #include namespace cpr { enum class AcceptEncodingMethods { identity, deflate, zlib, gzip, disabled, }; // NOLINTNEXTLINE(cert-err58-cpp) static const std::map AcceptEncodingMethodsStringMap{{AcceptEncodingMethods::identity, "identity"}, {AcceptEncodingMethods::deflate, "deflate"}, {AcceptEncodingMethods::zlib, "zlib"}, {AcceptEncodingMethods::gzip, "gzip"}, {AcceptEncodingMethods::disabled, "disabled"}}; class AcceptEncoding { public: AcceptEncoding() = default; // NOLINTNEXTLINE(google-explicit-constructor) AcceptEncoding(const std::initializer_list& methods); // NOLINTNEXTLINE(google-explicit-constructor) AcceptEncoding(const std::initializer_list& methods); [[nodiscard]] bool empty() const noexcept; [[nodiscard]] const std::string getString() const; [[nodiscard]] bool disabled() const; private: std::unordered_set methods_; }; } // namespace cpr #endif