type http_headers = | Generic of string*string | Referer of Url.url
type describing an http header
val timeout : float ref
timeout specifies the default timeout used during get_page.
val proxy : (string * int) option ref
proxy specifies the default proxy used during get_page.
None means no proxy, otherwise Some (host, port) is the host and
port to use.
type get_args = Timeout of float | Args of (string * string) list | Headers of http_headers list | Post | Proxy of string * int | HeadersHandler of (int -> (string * string) list -> unit)
val get_page : Url.url -> get_args list -> Bufrw.read_buffer_type -> unit
This function is the most general function.
get_page url args content_handler tries to download url.
More options can be specified by the args argument:
Headers req_headers are headers added to the request.
With Post , the POST method is used, else the method used is GET.
With Proxy (hostname, port), a proxy is used.
Go to the first, previous, next, last section, table of contents.