adjust documentation
This commit is contained in:
parent
df099590c9
commit
a03e4c1e61
2 changed files with 7 additions and 1 deletions
|
@ -52,7 +52,8 @@ open Lwt.Infix
|
||||||
|
|
||||||
module Make (HTTP_client : Http_mirage_client.S) = struct
|
module Make (HTTP_client : Http_mirage_client.S) = struct
|
||||||
let start http_client =
|
let start http_client =
|
||||||
Http_mirage_client.one_request http_client "https://mirage.io/"
|
let body_f _response acc data = Lwt.return (acc ^ data) in
|
||||||
|
Http_mirage_client.one_request http_client "https://mirage.io/" body_f ""
|
||||||
>>= function
|
>>= function
|
||||||
| Ok (resp, body) -> ...
|
| Ok (resp, body) -> ...
|
||||||
| Error _ -> ...
|
| Error _ -> ...
|
||||||
|
|
|
@ -36,3 +36,8 @@ val request :
|
||||||
-> (response -> 'a -> string -> 'a Lwt.t)
|
-> (response -> 'a -> string -> 'a Lwt.t)
|
||||||
-> 'a
|
-> 'a
|
||||||
-> (response * 'a, [> Mimic.error ]) result Lwt.t
|
-> (response * 'a, [> Mimic.error ]) result Lwt.t
|
||||||
|
(** [request ~config ~tls_config t ~authenticator ~meth ~headers ~body
|
||||||
|
~max_redirect ~follow_redirect url body_f body_init] does a HTTP request
|
||||||
|
to [url] using [meth] and the HTTP protocol in [config]. The response is
|
||||||
|
the value of this function. The body is provided in chunks (see [body_f]).
|
||||||
|
Reasonably defaults are used if not provided. *)
|
||||||
|
|
Loading…
Reference in a new issue