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();
    void clearDomain(const std::string& domain);
    bool loadFromFile(const std::string& path);
    bool saveToFile(const std::string& path) const;
    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.

Remove cookies stored for exactly this domain.

Load or save this jar to a versioned file. Loading replaces the current contents.

Returns:

The number of cookie entries across all domains.

Returns:

true if no cookies are stored.

Returns:

true if the domain has cookies