Interface ICookieManager
interface ICookieManager
Extends com.amazon.apmf.IStandard
This interface manages the cookie store for a KeplerScript application.
It provides methods to add, retrieve, and clear cookies.
Methods
clearAllCookies()
void clearAllCookies()
Clears all cookies from the cookie store.
Throws
OutOfMemoryError— If memory allocation fails.NotSupportedError— If the operation is not supported.BaseError— For other unexpected errors.
addCookie()
Adds a cookie in cookie store. The cookie’s name must not be empty. If a cookie with the same name, domain, and path already exists, it will be replaced.voidaddCookie(ICookie*cookie)
Parameters
cookie
ICookie* — Required
The ICookie instance.
Throws
OutOfMemoryError— If memory allocation fails.NotSupportedError— If the operation is not supported.BaseError— For other unexpected errors.InvalidArgumentError— If the cookie name is empty or contains invalid characters.
getCookies()
Retrieves cookies from the cookie store filtered by the given domain. Domain matching is case-insensitive and includes subdomain matching when the cookie’s domain attribute has a leading dot.ICookie*[]getCookies(stringdomain)
Parameters
domain
string — Required
The domain to filter cookies by.
Returns
ICookie*[]
Array of cookies matching the specified domain.
Returns an empty array if no cookies match the domain.
Throws
OutOfMemoryError— If memory allocation fails.NotSupportedError— If the operation is not supported.BaseError— For other unexpected errors.

