Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Eliom_cookie

module Eliom_cookie : sig..end

Cookies table manipulation (Duplicate of Ocsigen_cookies).

module Cookies : Map.Swith type key = Url.path

Map addressed by URL path, used for Eliom_cookie.cookieset.

type cookie = Ocsigen_cookies.cookie  =  | OSet of float option * string * bool(* <<div class="odocwiki_info"|~Install a cookies on the client~. ~The float option is the
      timestamp for the expiration date~. ~The string is the value~.  ~If
      the bool is true and the protocol is https~, the cookie will be
      secure ~(it will ask the browser to send it only through secure
>> *) | OUnset(* <<div class="odocwiki_info"|~Removes cookies from the client~.
>> *)

HTTP cookies representation.

type cookieset = cookie Eliom_lib.String.Table.t Cookies.t

Set of cookie, grouped by path.

val empty_cookieset : cookie Eliom_lib.String.Table.t Cookies.t

Empty set of cookies.

The function add_cookie path c v cookie_table adds the cookie c to the table cookie_table. If the cookie is already bound, the previous binding disappear.

The function remove_cookie c cookie_table removes the cookie c from the table cookie_table. Warning: it is not equivalent to add_cookie ... OUnset ...).

val add_cookies : 
  cookie Eliom_lib.String.Table.t Cookies.t ->
  cookie Eliom_lib.String.Table.t Cookies.t ->
  cookie Eliom_lib.String.Table.t Cookies.t

The functionadd_cookies newcookies oldcookies adds the cookies from newcookies to oldcookies. If cookies are already bound in oldcookies, the previous binding disappear.