package current_web
Module Current_web.ContextSource
The context of a single web request.
set_user t user records a successful login by user and redirects the user back to the page they came from.
Source
val respond_ok :
t ->
[< Html_types.div_content_fun ] Tyxml.Html.elt list ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.trespond_ok ctx content returns a successful page with content inserted into the site template.
respond_redirect ctx uri redirects the user to uri.
Source
val respond_error :
t ->
Cohttp.Code.status_code ->
string ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.trespond_error ctx code msg returns an error message to the user, inside the site template.