Up

module Cookie

: sig

Functions for the HTTP Cookie and Set-Cookie header fields. Using the Set-Cookie header field, an HTTP server can pass name/value pairs and associated metadata (called cookies) to a user agent. When the user agent makes subsequent requests to the server, the user agent uses the metadata and other information to determine whether to return the name/value pairs in the Cookie header.

#
type expiration = [
| `Session
| `Max_age of int64
]

Lifetime of the cookie after which the user agent discards it

#
type cookie = string * string

A cookie is simply a key/value pair send from the client to the server

#
module Cookie_hdr : sig
#
val extract : Header.t -> cookie list

Return the list of cookies sent by the client

#
val serialize : cookie list -> string * string

serialize cookies returns an HTTP header containing cookies

end
#
val expiration_of_sexp : Sexplib.Sexp.t -> expiration
#
val __expiration_of_sexp__ : Sexplib.Sexp.t -> expiration
#
val sexp_of_expiration : expiration -> Sexplib.Sexp.t
end