Module Headers.Name

Header names.

HTTP header names are US-ASCII case insensitive. Values of type Name.t represent US-ASCII lowercased HTTP tokens.

type t = private string

The type for lowercased HTTP header field field-names.

val v : string -> t

v s is a name from s. Raises Invalid_argument if s is not a header name. Use decode if you need to handle failures.

val equal : t -> t -> bool

equal n n' is true iff n and n' are equal.

val compare : t -> t -> int

compare is

val decode : string -> (t, string) Stdlib.result

decode s decodes a name from s.

val encode : t -> string

encode n encodes a name for s.

val pp : Stdlib.Format.formatter -> t -> unit

pp formats header names for inspection.