package irmin-http
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=11fc2570bdbfd48478c89113fc801084a84a9a2c12d9bf8c64e05ce64ae19bd7
sha512=2171699ca24dec5c9c908a2676b272e034c14eb17f7052a794535e52af0be40be68a689e59c0a640ee244b11703320483f4d0c261542e6242ba23a8f1272b9b0
doc/irmin-http.unix/Irmin_http_unix/Http_client/IO/index.html
Module Http_client.IOSource
include Cohttp.S.IO with type 'a t = 'a Lwt.t with type 'a t = 'a Lwt.t
a >>= b will pass the result of a to the b function. This is a monadic bind.
ic represents an input channel
oc represents an output channel
conn represents the underlying network flow
read_line ic will read a single line terminated by CR or CRLF from the input channel ic. It returns None if EOF or other error condition is reached.
read ic len will block until a maximum of len characters are read from the input channel ic. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than len characters if input buffering is not sufficient to satisfy the request.
write oc s will block until the complete s string is written to the output channel oc.
catch f is f () >|= Result.ok, unless f fails with an IO error, in which case it returns the error.