package cohttp-server-lwt-unix

  1. Overview
  2. Docs

Module Cohttp_server_lwt_unix.ContextSource

Sourcetype t

A request context

Sourceval request : t -> Http.Request.t

request t returns the HTTP request

Sourceval read_body : t -> string Lwt.t

read_body t read the request body as a string

Sourceval discard_body : t -> unit Lwt.t

discard_body t discard the request body

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

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

OCaml

Innovation. Community. Security.