def cookie.line
emerging-ezhttp@0.21.0.0 · src/cookie.bend:269
import emerging-ezhttp@0.21.0.0/src/cookie.bend as Cookie
import Base
269
270def cookie.line(c: Cookie) -> String:
271 match c:
272 case Cookie{name, value, expires, max_age, domain, path, secure, http_only,
273 same_site, host_only}:
274 name ++ "=" ++ value
275 ++ cookie.opt("; Expires=", expires)
276 ++ cookie.opt("; Max-Age=", max_age)
277 ++ cookie.domain_text(domain, host_only)
278 ++ cookie.opt("; Path=", path)
279 ++ cookie.mark("Secure", secure)
280 ++ cookie.mark("HttpOnly", http_only)
281 ++ cookie.opt("; SameSite=", same_site)