object
http_cookie_jar
HTTP cookie jar implementing explicit storage and request matching on top of the http_cookies parsing and generation predicates, with explicit save and load operations for persisting jar contents.
logtalk_load(http_session(loader))static, context_switching_callsPublic predicates
open/1
Opens a new empty cookie jar.
staticopen(Jar)open(-compound) - oneopen/2
Opens a new cookie jar using the given options list. Supported options include cookies_file(File) for preloading previously persisted cookies from disk.
staticopen(Jar,Options)open(-compound,+list(compound)) - one_or_errorOptions is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)instantiation_errortype_error(atom,File)domain_error(http_cookie_jar_persisted_cookies,PersistedCookies)domain_error(http_cookie_jar_persisted_cookie,PersistedCookie)close/1
Closes a cookie jar and removes all stored cookies.
staticclose(Jar)close(+compound) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))clear/1
Removes all currently stored cookies from a cookie jar while keeping the jar handle valid.
staticclear(Jar)clear(+compound) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))store_set_cookies/3
Stores normalized Set-Cookie terms for the given absolute URL, replacing existing cookies with the same name, domain, and path.
staticstore_set_cookies(Jar,URL,SetCookies)store_set_cookies(+compound,+atom,+list(compound)) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))URL is a variable:instantiation_errorURL is not a supported absolute cookie-jar URL:domain_error(http_cookie_jar_url,URL)URL uses an unsupported cookie-jar URL scheme:domain_error(http_cookie_jar_url_scheme,Scheme)SetCookies is a variable or a partial list:instantiation_errorSetCookies is not a valid set-cookie list:domain_error(http_cookie_jar_set_cookies,SetCookies)SetCookie of SetCookies is not a valid normalized Set-Cookie term:domain_error(http_cookie_jar_set_cookie,SetCookie)request_cookies/3
Returns the cookie name-value pairs currently applicable to the given absolute URL using the convenience default request_context(get, source_url(URL), false).
staticrequest_cookies(Jar,URL,Cookies)request_cookies(+compound,+atom,-list(compound)) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))URL is a variable:instantiation_errorURL is not a supported absolute cookie-jar URL:domain_error(http_cookie_jar_url,URL)URL uses an unsupported cookie-jar URL scheme:domain_error(http_cookie_jar_url_scheme,Scheme)request_cookies/4
Returns the cookie name-value pairs currently applicable to the given absolute URL for an explicit request context represented as request_context(Method, Source, TopLevelNavigation) where Source is either source_url(URL) for an absolute HTTP or HTTPS URL or source_origin(Origin) for a bare Origin header value.
staticrequest_cookies(Jar,URL,RequestContext,Cookies)request_cookies(+compound,+atom,+compound,-list(compound)) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))URL is a variable:instantiation_errorURL is not a supported absolute cookie-jar URL:domain_error(http_cookie_jar_url,URL)URL uses an unsupported cookie-jar URL scheme:domain_error(http_cookie_jar_url_scheme,Scheme)RequestContext is not a valid cookie-jar request context:domain_error(http_cookie_jar_request_context,RequestContext)RequestContext contains an invalid method:type_error(atom,Method)RequestContext contains an invalid source:domain_error(http_cookie_jar_request_source,Source)RequestContext contains an invalid top-level-navigation flag:domain_error(boolean,TopLevelNavigation)cookies/2
Returns the currently stored cookies as cookie(Name, Value, Attributes) terms.
staticcookies(Jar,Cookies)cookies(+compound,-list(compound)) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))cookie_count/2
Returns the number of currently stored cookies.
staticcookie_count(Jar,Count)cookie_count(+compound,-integer) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))save/2
Persists the currently stored cookies to a file using a canonical Logtalk term representation.
staticsave(Jar,File)save(+compound,+atom) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))File is a variable:instantiation_errorFile is neither a variable nor an atom:type_error(atom,File)load/2
Loads previously persisted cookies from a file, replacing the current jar contents.
staticload(Jar,File)load(+compound,+atom) - one_or_errorJar is a variable:instantiation_errorJar is neither a variable nor an open cookie-jar handle:domain_error(http_cookie_jar,Jar)Jar refers to a closed cookie-jar handle:existence_error(http_cookie_jar,cookie_jar(JarId))File is a variable:instantiation_errorFile is neither a variable nor an atom:type_error(atom,File)domain_error(http_cookie_jar_persisted_cookies,PersistedCookies)domain_error(http_cookie_jar_persisted_cookie,PersistedCookie)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
jar_seed_/1
Last allocated cookie jar identifier.
dynamicjar_seed_(JarId)jar_seed_(?positive_integer) - zero_or_onejar_state_/2
Per-jar creation index counter state.
dynamicjar_state_(JarId,CreationIndex)jar_state_(?positive_integer,?non_negative_integer) - zero_or_morejar_cookie_/11
Stored cookie entries indexed by jar identifier.
dynamicjar_cookie_(JarId,Name,Domain,Path,Value,HostOnly,Secure,HttpOnly,SameSite,Expiry,CreationIndex)jar_cookie_(?positive_integer,?atom,?atom,?atom,?atom,?boolean,?boolean,?boolean,?nonvar,?nonvar,?positive_integer) - zero_or_moreOperators
(none)