def cookie.make
bend-kit-http@0.38.2.0 · http.bend:2308
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-time@0.3.0.0/time.bend as Time
import bend-kit-url@0.4.1.0/url.bend as Url
2308def cookie.make(+now: Time.Instant, a: Url.Abs, +name: String, +value: String, c: Cav) -> Maybe<&2, Cookie>:
2309 Url.Abs{scheme, host, port, target} = a
2310 Cav{e, m, d, +p, secure, http_only, same_site} = c
2311 cookie.make.dm(cookie.domain.of(host, d), name, value, cookie.path.of(p, cookie.target_path(target)), Maybe.is_some(&2, String, p), secure, http_only, same_site, cookie.expiry(now, m, e), String.eq(scheme, "https"))