package cohttp

  1. Overview
  2. Docs

Module Cookie.Set_cookie_hdrSource

Sourcetype t = {
  1. cookie : cookie;
  2. expiration : expiration;
  3. domain : string option;
  4. path : string option;
  5. secure : bool;
  6. http_only : bool;
}

A header which a server sends to a client to request that the client returns the cookie in future requests, under certain conditions.

include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval make : ?expiration:expiration -> ?path:string -> ?domain:string -> ?secure:bool -> ?http_only:bool -> cookie -> t
Sourceval serialize : ?version:[ `HTTP_1_0 | `HTTP_1_1 ] -> t -> string * string

Return an HTTP header

Sourceval extract : Header.t -> (string * t) list

Return the list of cookies sent by the server

The name-value binding

Sourceval value : t -> string

The value

Sourceval expiration : t -> expiration

The expiration

Sourceval domain : t -> string option

The domain for which the cookie is valid, if any

Sourceval path : t -> string option

The path for which the cookie is valid, if any

Sourceval secure : t -> bool

Has the cookie's secure attribute been set?

Sourceval http_only : t -> bool
OCaml

Innovation. Community. Security.