This is server API (go to client)

Module Eliom_parameter

module Eliom_parameter : sig..end

Specifying parameter as type_checker check t is equivalent as t but the check function is called after decoding the parameters, allowing you to make more checks on the parameters before the service handler is called. Raise an exception if the parameter is not correct, and the error handler will be called instead of the service handler.


include Eliom_parameter_sigs.​S
val type_checker : 
  ('a -> unit) ->
  ('a, [< suff ] as 'b, 'c) params_type -> ('a, 'b, 'c) params_type

Specifying parameter as type_checker check t is equivalent as t but the check function is called after decoding the parameters, allowing you to make more checks on the parameters before the service handler is called. Raise an exception if the parameter is not correct, and the error handler will be called instead of the service handler.

val regexp : 
  Netstring_pcre.regexp ->
  string ->
  to_string:(string -> string) ->
  string ->
  (string, [ `WithoutSuffix ], [ `One of string ] param_name)
  params_type

regexp r d s tells that the service takes a string that matches the regular expression r as parameter, labeled s, and that will be rewritten in d. The syntax of regexp is PCRE's one (uses Netstring_pcre, from OCamlnet). For example: regexp (Netstring_pcre.regexp "\[(.* )\]") "($1)" "myparam" will match the parameter myparam=[hello] and send the string "(hello)" to the service handler.

val all_suffix_regexp : 
  Netstring_pcre.regexp ->
  string ->
  to_string:(string -> string) ->
  string ->
  (string, [ `Endsuffix ], [ `One of string ] param_name) params_type

all_suffix_regexp r d s takes all the suffix, as long as possible, matching the regular expression r, name s, and rewrite it in d.

val get_non_localized_get_parameters : 
  ('a, [ `WithoutSuffix ], 'b) non_localized_params -> 'a option

get_non_localized_get_parameters ~sp p decodes and returns non localized GET parameters specified by p if present.

val get_non_localized_post_parameters : 
  ('a, [ `WithoutSuffix ], 'b) non_localized_params -> 'a option

get_non_localized_post_parameters ~sp p decodes and returns non localized POST parameters specified by p if present.