package sihl

  1. Overview
  2. Docs
val find_alert : Request.t -> string option

find_alert request returns the alert stored in the flash storage of the current request.

Make sure that the flash middleware is installed.

val set_alert : string -> Response.t -> Response.t

set_alert alert response returns a response with an alert message associated to it. Use alert to tell the user that something went wrong.

Make sure that the flash middleware is installed.

val find_notice : Request.t -> string option

find_notice request returns the notice stored in the flash storage of the current request.

Make sure that the flash middleware is installed.

val set_notice : string -> Response.t -> Response.t

set_notice notice response returns a response with a notice message associated to it. Use notice to tell the user that something happened (successfully).

Make sure that the flash middleware is installed.

val find : string -> Request.t -> string option

find key request returns the string stored in the flash storage of the current request associated with key.

Make sure that the flash middleware is installed.

val set : (string * string) list -> Response.t -> Response.t

set flash response returns a response with the flash stored. Use this to store arbitrary key-value values in the flash store.

Make sure that the flash middleware is installed.

val log_src : Logs.src