Module Http_types.Body

module How : sig ... end
type t = [
  1. | `Empty
  2. | `String of string
  3. | `Strings of string list
  4. | `Pipe of string Async_kernel.Pipe.Reader.t
]
val sexp_of_t : t -> Sexplib0.Sexp.t
val to_string_opt' : t -> string option Async_kernel.Deferred.t

to_string_opt' t converts the given t value to a string, if possible.

val to_string' : t -> string Async_kernel.Deferred.t

to_string' t converts the given t value to a string, if possible.

val to_string_list' : t -> string list Async_kernel.Deferred.t

to_string_list' t converts the given t value to a list of strings.

val of_string : string -> t

of_string str creates a new t value from the given string.

val of_string_list : string list -> t

of_string_list str_list creates a new t value from the given list of strings.

val length_opt : t -> int option

length_opt data returns length of data or None if data is a pipe.

val is_pipe : t -> bool

is_pipe data returns true if data is of type `Pipe.

val close : t -> unit

close data closes the Pipe.Reader.t.