object
http_cookies(Representation)ï
Representation- Cookie header representation. Valid values areatom,chars, andcodes.
HTTP Cookie and Set-Cookie header parsing and generation predicates implementing RFC 6265 syntax.
logtalk_load(http_cookies(loader))static, context_switching_calls
Cookie header pairs: Cookie header values are represented as
Name-Valuepairs.Set-Cookie components: Set-Cookie header values are represented by a cookie name, a cookie value, and an attribute list where attributes use
Key-Valuenotation such asexpires-date_time(Year, Month, Day, Hours, Minutes, Seconds),max_age-Seconds,domain-Domain,path-Path,secure-true,http_only-true,same_site-lax,partitioned-true,priority-high, andextension-Attribute.Extension attributes: Unknown
Set-Cookieattributes are preserved verbatim asextension-Attributepairs as long as they do not use a reserved RFC 6265 attribute name.Expires attribute: The
Expiresattribute value is normalized to adate_time(Year, Month, Day, Hours, Minutes, Seconds)term and generated back using the canonical HTTP-date representation.
Public predicatesï
valid_cookie/1ï
True iff the argument is a valid HTTP Cookie header field value.
staticvalid_cookie(Cookie)valid_cookie(++text) - zero_or_oneparse_cookie/2ï
Parses a Cookie header field value into a list of Name-Value pairs.
staticparse_cookie(Cookie,Pairs)parse_cookie(++text,-list(compound)) - zero_or_onegenerate_cookie/2ï
Generates a canonical Cookie header field value from a list of Name-Value pairs using ; as the separator.
staticgenerate_cookie(Pairs,Cookie)generate_cookie(++list(compound),-text) - zero_or_onevalid_set_cookie/1ï
True iff the argument is a valid HTTP Set-Cookie header field value.
staticvalid_set_cookie(SetCookie)valid_set_cookie(++text) - zero_or_oneparse_set_cookie/4ï
Parses a Set-Cookie header field value into a cookie name, a cookie value, and a list of attributes.
staticparse_set_cookie(SetCookie,Name,Value,Attributes)parse_set_cookie(++text,-text,-text,-list(compound)) - zero_or_onegenerate_set_cookie/4ï
Generates a canonical Set-Cookie header field value from a cookie name, a cookie value, and a list of attributes.
staticgenerate_set_cookie(Name,Value,Attributes,SetCookie)generate_set_cookie(++text,++text,++list(compound),-text) - zero_or_onenormalize_cookie_attributes/2ï
Normalizes and validates a Set-Cookie attribute list using the canonical attribute term representation.
staticnormalize_cookie_attributes(Attributes,NormalizedAttributes)normalize_cookie_attributes(++list(compound),-list(compound)) - zero_or_onecookie_attribute_present/2ï
True iff a normalized Set-Cookie attribute list contains an attribute with the given name.
staticcookie_attribute_present(Attributes,Name)cookie_attribute_present(++list(compound),++atom) - zero_or_onecookie_attribute_value/3ï
Returns the first value for the attribute with the given name in a normalized Set-Cookie attribute list.
staticcookie_attribute_value(Attributes,Name,Value)cookie_attribute_value(++list(compound),++atom,-term) - zero_or_onecookie_attribute_value/4ï
Returns the first value for the attribute with the given name in a normalized Set-Cookie attribute list or the given default value when absent.
staticcookie_attribute_value(Attributes,Name,Default,Value)cookie_attribute_value(++list(compound),++atom,++term,-term) - zero_or_onecookie_expiry/2ï
Returns the raw normalized expiry view for a Set-Cookie attribute list as session, max_age(Seconds), or expires(DateTime).
staticcookie_expiry(Attributes,Expiry)cookie_expiry(++list(compound),-compound) - zero_or_onecookie_expiry/3ï
Resolves the normalized expiry view for a Set-Cookie attribute list against the given current Unix time as session, delete, or expires(UnixTime).
staticcookie_expiry(Attributes,CurrentUnixTime,Expiry)cookie_expiry(++list(compound),++integer,-compound) - zero_or_onecookie_deletion/3ï
Returns a canonical Set-Cookie term that deletes the named cookie while echoing the relevant scoping and policy attributes from a template attribute list.
staticcookie_deletion(Name,Attributes,Deletion)cookie_deletion(++text,++list(compound),-compound) - zero_or_oneProtected predicatesï
(no local declarations; see entity ancestors if any)
Private predicatesï
(no local declarations; see entity ancestors if any)
Operatorsï
(none)