Module Webs_curl

libcurl client connector

type t

The type for curl client connectors.

val make : unit -> t

make () is a curl client connector.

val fetch : ?insecure:bool -> ?follow:bool -> t -> Webs.Http.Scheme.t -> Webs.Http.Request.t -> (Webs.Http.Response.t, string) Stdlib.result

fetch c ~scheme r fetches the response for request r using scheme scheme.

If follow is true (default) HTTP redirects for GET and HEAD that return 301, 302, 303, 305 or 307 are automatically followed.

If insecure is true (defauls to false) TLS server certificates are not checked.