include Cohttp_lwt.Server with type IO.conn = Flow.flow
module IO : Cohttp_lwt.S.IO with type conn = Flow.flow
val resolve_local_file : docroot:string -> uri:Uri.t -> string
Resolve a URI and a docroot into a concrete local filename.
val respond : ?headers:Cohttp.Header.t -> ?flush:bool -> status:Cohttp.Code.status_code -> body:Cohttp_lwt_body.t -> unit -> (Cohttp.Response.t * Cohttp_lwt_body.t) Lwt.t
respond ?headers ?flush ~status ~body will respond to an HTTP request with the given
status code and response
flush is true, then every response chunk will be flushed to the network rather than being buffered.
flush is true by default. The transfer encoding will be detected from the
body value and set to chunked encoding if it cannot be determined immediately. You can override the encoding by supplying an appropriate
Transfer-encoding in the