gleam/http/cookie
Types
pub type Attributes {
Attributes(
max_age: Option(Int),
domain: Option(String),
path: Option(String),
secure: Bool,
http_only: Bool,
same_site: Option(SameSitePolicy),
)
}
Constructors
-
Attributes( max_age: Option(Int), domain: Option(String), path: Option(String), secure: Bool, http_only: Bool, same_site: Option(SameSitePolicy), )
pub type SameSitePolicy {
Lax
Strict
None
}
Constructors
-
Lax
-
Strict
-
None
Functions
pub fn parse(cookie_string: String) -> List(#(String, String))
Parse a list of cookies from a header string. Any malformed cookies will be discarded.
pub fn set_header(name: String, value: String, attributes: Attributes) -> String