Module Spindle_client.Body

An answer's body, read a piece at a time.

type t
val read : t -> ([ `Data of string | `End ], [> error ]) Stdlib.result

The next piece as it arrived, or its end. Each read waits at most the call's read_timeout; a read after one that failed answers that failure again, since a read cut off leaves a TLS connection unreadable; and a read after the function it was handed to has returned is `End.