Module Webdriver_cohttp_lwt_unix.Cookie

Cookies management.

type same_site = [
| `Lax
| `Strict
| `Undef
]
type t = {
name : string;
value : string;
path : string;
domain : string option;
secure : bool;
http_only : bool;
expiry : int;
same_site : same_site;
}
val make : ?⁠path:string -> ?⁠domain:string -> ?⁠secure:bool -> ?⁠http_only:bool -> ?⁠expiry:int -> ?⁠same_site:same_site -> name:string -> value:string -> unit -> t

A helper function to create a new cookie with some optional parameters. The resulting cookie will not be set in the browser ands needs to be added.

val add : t -> unit cmd

add cookie creates or updates the cookie in the browser.

val all : t list cmd

Returns the list of all cookies set in the browser.

val get : string -> t cmd

get cookie_name returns the configuration of the cookie with the specified name. Raises `no_such_cookie otherwise.