View Source HttpCookie (http_cookie v0.5.0)
HTTP Cookie struct with parsing and related logic.
Implemented according to RFC6265
Summary
Functions
Checks if a cookie has expired.
Creates an HttpCookie from a Set-Cookie
header value.
Checks if the cookie matches the provided request url.
Formats the cookie for sending in a "Cookie" header.
Types
@type t() :: %HttpCookie{ creation_time: DateTime.t(), domain: binary(), expiry_time: DateTime.t(), host_only?: boolean(), http_only?: boolean(), last_access_time: DateTime.t(), name: binary(), path: binary(), persistent?: boolean(), secure_only?: boolean(), value: binary() }
Functions
Checks if a cookie has expired.
Uses the current time if no time is provided.
Creates an HttpCookie from a Set-Cookie
header value.
Options
:reject_public_suffixes
- controls whether to reject public suffixes to guard against "supercookies", defaults to true
Checks if the cookie matches the provided request url.
The check is done as specified in RFC 6265.
Formats the cookie for sending in a "Cookie" header.