Module Http

module Http: sig .. end
HyperText Transfert Protocol

val debug : bool

HTTP Error codes


type code = int 
val text_of_code : code -> string
val string_of_code : code -> string
val print_code : Batteries.Format.formatter -> code -> unit

HTTP commands, headers...


type cmd = 
| Status of code
| Request of string * string
type header = string * string 
val string_of_header : string * string -> string
val print_header : 'a BatInnerIO.output -> string * string -> unit
val print_headers : 'a BatInnerIO.output -> (string * string) list -> unit
val string_of_headers : (string * string) list -> string
val header_content_length_re : Str.regexp
val chunked_transfert_encoding_re : Str.regexp
val headers_find : Batteries.String.t -> (Batteries.String.t * 'a) list -> 'a option
val headers_find_all : Batteries.String.t -> (Batteries.String.t * 'a) list -> 'a list
val header_present : Batteries.String.t ->
Batteries.String.t -> (Batteries.String.t * Batteries.String.t) list -> bool
val must_close_cnx : (Batteries.String.t * Batteries.String.t) list -> bool

HTTP Messages


module Pdu: sig .. end

TRX for HTTP messages


module TRXtop: sig .. end
Special kind of transceiver, useful when it's on top of a TRX stack, that receive and tx Pdu.t messages (instead of bitstring).

TRX for any payload


module TRX: sig .. end
Once build (as a poster or server), the Http.TRX handle the whole connection(s).
val post_decode : string -> string
val post_encode : string -> string