package cohttp-server-lwt-unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Encoding : sig ... end
type t

A response body

val string : ?encoding:Encoding.t -> string -> t

string ?encoding s respond with body s.

?encoding the encoding to use. by default this is Encoding.fixed

module Substring : sig ... end
val stream : ?encoding:Encoding.t -> (unit -> Substring.t option Lwt.t) -> t

stream ?encoding f respond with body generated by repeatedly applying f. When f returns None, it will be considered terminated.

?encoding is the encoding to use. By default this is Encoding.chunked.

OCaml

Innovation. Community. Security.