B0_http.Http_clientHTTP clients.
val make :
?insecure:bool ->
?progress:bool ->
?search:B0_std.Cmd.tool_search ->
?cmd:B0_std.Cmd.t ->
unit ->
(t, string) Stdlib.resultmake ~search ~cmd () looks for cmd (defaults to Cmd.tool "curl") in search (defaults to Os.Cmd.get ~search). If insecure is true (defaults to false) TLS server certificates are not checked. If progress is true some form of progress is shown on stdout on request.
val request :
t ->
follow:bool ->
Http.Request.t ->
(Http.Response.t, string) Stdlib.resultrequest httpc ~follow r performs request r via httpr. If follow is true HTTP redirects for GET and HEAD requests that return 301, 302, 303, 305 or 307 are automatically followed. In this case the response has an x_follow_location header with the final requested URL.
The response's Http.Response.headers are lowercased.
x_follow_location is "x-follow-location" the location that was finally requested on request with ~follow:true.
val curl :
?docs:string ->
?env:Cmdliner.Cmd.Env.info ->
unit ->
B0_std.Cmd.t Cmdliner.Term.tcurl is a cli interface for specifying the curl command line tool.
val curl_fetch_args :
?args:B0_std.Cmd.t ->
progress:bool ->
B0_std.Net.Url.t ->
B0_std.Fpath.t ->
B0_std.Cmd.tcurl_fetch_args url file are curl arguments to fetch the URL url and write it to file. If progress is true it is reported. args are added to the result before the URL. Redirections are followed.