Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cohttp/src/header.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ let is_header_with_list_value =
let init () =
StringMap.empty

let is_empty x = StringMap.is_empty x

let init_with k v =
StringMap.singleton (LString.of_string k) [v]

Expand Down
3 changes: 3 additions & 0 deletions cohttp/src/header.mli
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ type t [@@deriving sexp]
(** Construct a fresh, empty map of HTTP headers *)
val init : unit -> t

(** Test whether a HTTP headers are empty or not. *)
val is_empty : t -> bool

(** Construct a fresh map of HTTP headers with a single key and value entry *)
val init_with : string -> string -> t

Expand Down