package sonet

  1. Overview
  2. Docs
type state
val init_state : unit -> state
val num_bytes_parsed : state -> int
type t = {
  1. version : version;
  2. status_code : int;
  3. reason_phrase : string;
  4. headers : header_fields;
}
type parse_result =
  1. | Result of t * int
  2. | Parse_incomplete of state
val parse : state -> string -> parse_result
val parse_substring : state -> string -> int -> int -> parse_result
type error
exception Http_error of error
val string_of_error : error -> string
val serialize : Buffer.t -> t -> unit