An OCaml webserver, but the allocating version (vs httpz which doesnt)
1(** HTTP header type and operations. *)
2
3module Name = Header_name
4
5(** Parsed header.
6 [name_span] is only meaningful when [name = Other]. *)
7type t =
8 { name : Name.t
9 ; name_span : Span.t
10 ; value : Span.t
11 }
12
13(** Find first header by name. Only matches known headers; use [find_string] for [Other]. *)
14val find : t list -> Name.t -> t option
15
16(** Find header by string name (case-insensitive). *)
17val find_string : Base_bigstring.t -> t list -> string -> t option
18
19(** Pretty-print header with buffer (shows actual values). *)
20val pp_with_buf : Base_bigstring.t -> Stdlib.Format.formatter -> t -> unit
21
22(** Pretty-print header structure. *)
23val pp : Stdlib.Format.formatter -> t -> unit