Module Fetch.Headers
Request and response headers.
Warning. We left out mutable operations out of the interface but remember these objects may mutate under your feet.
Headers
type t
The type for
Headers
objects.
val mem : Jstr.t -> t -> bool
mem h hs
istrue
iff headerh
has a value inhs
. The lookup is case insensitive.
Converting
val of_obj : Jv.t -> t
of_obj o
uses the keys and values of objecto
to define headers and their value.
val of_assoc : ?init:t -> (Jstr.t * Jstr.t) list -> t
of_assoc ~init assoc
are the headers frominit
(default si empty) to which the header value pairs ofassoc
are appended. If a header is defined more than once this either overwrites the previous definition, or appends to the value if if the value can be multi-valued.