Module Http.Cookie
Cookies.
val atts : ?max_age:int -> ?domain:string -> ?path:string -> ?secure:bool -> ?http_only:bool -> ?same_site:string -> unit -> atts
atts
are the given cookie attributes. If an attribute is absent it is not mentioned in the cookie sepcification except forsame_site
which are always specified and respectively defaults to"strict"
andhttp_only
with default totrue
.TODO. Should we default
path
to"/"
and usepath
? Also maybesecure
should default totrue
it's just if we devise a good dev/production configuration story.
val atts_default : atts
atts_default
isatts ()
.
val encode : ?atts:atts -> name:string -> string -> string
encodes ~atts name s
encodes a cookie with attributesatts
(defaults) toatts_default
forH.set_cookie
.
val decode_list : string -> ((string * string) list, string) Stdlib.result
decode_list s
parses the cookie string of aH.cookie
header.