class EE::Network::CookieManager

Overview

#include <cookiemanager.hpp>

class CookieManager {
public:
    // methods

    void storeCookies(const std::string& domain, const Http::Response& response);
    void storeCookiesFromHeader(const std::string& domain, const std::string& setCookieHeader);
    std::string getCookieHeader(const std::string& domain) const;
    void clear();
    size_t size() const;
    bool empty() const;
    bool hasCookie(const std::string& domain) const;
};

Detailed Documentation

Methods

Store Set-Cookie headers from an HTTP response for the given domain.

Store cookies from a raw Set-Cookie header string.

Build the Cookie header string for outgoing requests to the given domain.

Remove all stored cookies.

Returns:

The number of cookie entries across all domains.

Returns:

true if no cookies are stored.

Returns:

true if the domain has cookies