.. index:: pair: class; EE::Network::CookieManager .. _doxid-class_e_e_1_1_network_1_1_cookie_manager: class EE::Network::CookieManager ================================ .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class CookieManager { public: // methods void :ref:`storeCookies`(const std::string& domain, const :ref:`Http::Response`& response); void :ref:`storeCookiesFromHeader`(const std::string& domain, const std::string& setCookieHeader); std::string :ref:`getCookieHeader`(const std::string& domain) const; void :ref:`clear`(); size_t :ref:`size`() const; bool :ref:`empty`() const; bool :ref:`hasCookie`(const std::string& domain) const; }; .. _details-class_e_e_1_1_network_1_1_cookie_manager: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; storeCookies .. _doxid-class_e_e_1_1_network_1_1_cookie_manager_1ae086d5138ec09d8e4f29b2e5c0b45afb: .. ref-code-block:: cpp :class: doxyrest-title-code-block void storeCookies(const std::string& domain, const :ref:`Http::Response`& response) Store Set-Cookie headers from an HTTP response for the given domain. .. index:: pair: function; storeCookiesFromHeader .. _doxid-class_e_e_1_1_network_1_1_cookie_manager_1ab4d5eee5fa8f60d39f552b178f2baef5: .. ref-code-block:: cpp :class: doxyrest-title-code-block void storeCookiesFromHeader(const std::string& domain, const std::string& setCookieHeader) Store cookies from a raw Set-Cookie header string. .. index:: pair: function; getCookieHeader .. _doxid-class_e_e_1_1_network_1_1_cookie_manager_1a6751389dc9dd29b603264e515bd37226: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::string getCookieHeader(const std::string& domain) const Build the Cookie header string for outgoing requests to the given domain. .. index:: pair: function; clear .. _doxid-class_e_e_1_1_network_1_1_cookie_manager_1a983174b8c409af0eab4ccebb0daca57d: .. ref-code-block:: cpp :class: doxyrest-title-code-block void clear() Remove all stored cookies. .. index:: pair: function; size .. _doxid-class_e_e_1_1_network_1_1_cookie_manager_1a4d7688dae2a1313accbb1c52e82b9f5c: .. ref-code-block:: cpp :class: doxyrest-title-code-block size_t size() const .. rubric:: Returns: The number of cookie entries across all domains. .. index:: pair: function; empty .. _doxid-class_e_e_1_1_network_1_1_cookie_manager_1af8f45ebd8ddca037f071e78af6a70aa3: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool empty() const .. rubric:: Returns: true if no cookies are stored. .. index:: pair: function; hasCookie .. _doxid-class_e_e_1_1_network_1_1_cookie_manager_1ace6239c8932697aacceb8adea2e755d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool hasCookie(const std::string& domain) const .. rubric:: Returns: true if the domain has cookies