Module Http_user_agent


module Http_user_agent: sig .. end
Minimal implementation of an HTTP 1.0/1.1 client. Interface is similar to Gerd Stoplmann's Http_client module. Implementation is simpler and doesn't handle HTTP redirection, proxies, ecc. The only reason for the existence of this module is for performances and incremental elaboration of response's bodies

exception Http_error of (int * string)
val get : ?head_callback:(Http_types.status -> (string * string) list -> unit) ->
string -> string
Raises Http_error when response code <> 200
Returns HTTP response's body
head_callback : optional calllback invoked on response's status and headers. If not provided no callback will be invoked
val get_iter : ?head_callback:(Http_types.status -> (string * string) list -> unit) ->
(string -> unit) -> string -> unit
as above but iter callback function on HTTP response's body instead of returning it as a string
val head : string -> string
Raises Http_error when response code <> 200
Returns HTTP HEAD raw response