package mechaml

  1. Overview
  2. Docs

Representation of a cookie

type t
type expiration = [
  1. | `Session
  2. | `Max_age of int64
]
val name : t -> string
val value : t -> string
val expiration : t -> expiration
val domain : t -> string
val path : t -> string
val secure : t -> bool
val match_uri : Uri.t -> t -> bool

Given an URI and a cookie, return true if the cookie's domain and path match the URI's one.

val make : ?expiration:expiration -> ?path:string -> ?secure:bool -> domain:string -> string -> string -> t

Create a cookie

OCaml

Innovation. Community. Security.