Module Cohttp_server_lwt_unix.Context

type t

A request context

val request : t -> Http.Request.t

request t returns the HTTP request

val read_body : t -> string Lwt.t

read_body t read the request body as a string

val discard_body : t -> unit Lwt.t

discard_body t discard the request body

val respond : t -> Http.Response.t -> Body.t -> unit Lwt.t

respond t response body respond to the request with response and body