Static.ParamsParams stores params of a request, either all or only required for authentication
val params : Dream.request -> t optionparams request returns t option if params were previously extracted for the request by set_params middleware.
type extractor = Dream.request -> t Lwt.textractor is a type of function which turns requests into params
val get_param : string -> t -> string optionget_param key params searches for a given key in params and returns Some str if it is present or None if it is not.
val get_param_exn : string -> t -> stringget_param_exn key params is the same as get_param, but returns an exeption if the key is not present
get_param_req key request is a shortcut for params request >>= get_param key.
val extract_query : extractorextract_query request extracts all query params of a request and returns them as params
val extract_json : extractorextract_json request extracts all pairs of keys and values of a JSON request. Content-Type must be application/json.
val extract_form : ?csrf:bool -> extractorextract_form request extracts params from forms send with Dream.csrf_tag. Content-Type must be application/x-www-form-urlencoded.
val of_assoc : (string * string) list -> tof_assoc lst creates t from assoc lists
val set_params :
extractor:extractor ->
Dream.handler ->
Dream.request ->
Dream.response Dream.promiseser_params ~extractor is a middleware which sets params for a request, extracting them using ~extractor.