package b0

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

HTTP requestors.

Performing requests

type t

The type for HTTP requestors.

val perform : ?insecure:bool -> ?follow:bool -> t -> Http.req -> (Http.resp, string) result

perform httpr r performs request r via httpr. If follow is true (default) HTTP redirects for GET and HEAD requests that return 301, 302, 303, 305 or 307 are automatically followed. If insecure is true (defaults to false) TLS server certificates are not checked.

The response's Http.resp_headers are lowercased.

curl requestor

val curl : ?docs:string -> ?env:Cmdliner.Arg.env -> unit -> B00_std.Cmd.t Cmdliner.Term.t

curl is a cli interface for specifying the curl command line tool.

val get_curl : ?search:B00_std.Fpath.t list -> ?curl:B00_std.Cmd.t -> unit -> (t, string) result

get_curl () looks for curl (defaults to "curl") in search.

OCaml

Innovation. Community. Security.