def cookie.parse

bend-kit-http@0.38.2.0 · http.bend:2325

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

2325# §5.6 and §5.7: one Set-Cookie value received from a at now, or None when it is ignored.
2326def cookie.parse(+now: Time.Instant, a: Url.Abs, +line: String) -> Maybe<&2, Cookie>:
2327  Bool.pick(Maybe<&2, Cookie>, cookie.ctl(line), None{}, cookie.parse.go(now, a, String.split(line, ';')))

Uses (10)

Used by (1)