Eliom_service_baseSourceinclude module type of struct include Types endtype ('get, 'tipo, 'gn) params = ('get, 'tipo, 'gn) Eliom_parameter.params_type constraint 'tipo = [< `WithSuffix | `WithoutSuffix ]type ('m, _, _, _, _, _, _) meth = ('m, _, _, _, _, _, _) Types.meth = | Get : ('gp, 'tipo, 'gn) params -> (get, 'gp, 'gn, unit, unit, 'tipo, unit) meth| Post : ('gp, 'tipo, 'gn) params
* ('pp, [ `WithoutSuffix ], 'pn) params -> (post,
'gp,
'gn,
'pp,
'pn,
'tipo,
'gp)
meth| Put : ('gp, 'tipo, 'gn) params -> (put,
'gp,
'gn,
Eliom_parameter.raw_post_data,
Eliom_parameter.no_param_name,
'tipo,
unit)
meth| Delete : ('gp, 'tipo, 'gn) params -> (delete,
'gp,
'gn,
Eliom_parameter.raw_post_data,
Eliom_parameter.no_param_name,
'tipo,
unit)
methMethod specification datatype
An Eliom service (see Eliom_service_sigs.S.t) can respond to one of the following HTTP methods:
Get g)Post (g, p))Put g)Delete g)In all cases, the service parameters need to be provided (see Eliom_parameter_sigs.S). POST (Post (g, p)) services accept both GET (g) and POST (p) parameters. For the other methods, only GET (g) parameters apply.
The type parameters are used to impose various type constraints, and are not necessarily of interest to the programmer. Their technical meaning is as follows.
Post (g, p) case when g is not unit ; used to force unit GET parameters when neededtype 'm which_meth = 'm Types.which_meth = | Get' : get which_meth| Post' : post which_meth| Put' : put which_meth| Delete' : delete which_methLike meth but without the parameters
module Url = Eliom_lib.Urlval which_meth_internal :
'm 'gp 'gn 'pp 'pn 'tipo 'x. ('m, 'gp, 'gn, 'pp, 'pn, 'tipo, 'x) meth ->
'm which_methtype 'a attached_info = | Attached : att -> att attached_info| Nonattached : non_att -> non_att attached_infotype send_appl_content = | XNever| XAlways| XSame_appl of string * string optionWhether the service is capable to send application content or not. (application content has type Eliom_service.eliom_appl_answer: content of the application container, or xhr redirection ...). A link towards a service with send_appl_content = XNever will always answer a regular http frame (this will stop the application if used in a regular link or form, but not with XHR). XAlways means "for all applications" (like redirections/actions). XSame_appl means "only for this application". If there is a client side application, and the service has XAlways or XSame_appl when it is the same application, then the link (or form or change_page) will expect application content.
*)type ('get, 'post, 'meth, 'attached, 'co, 'ext, 'reg, +'tipo, 'getnames, 'postnames, 'rt)
t =
{pre_applied_parameters : (string * Eliommod_parameters.param) list
Eliom_lib.String.Table.t
* (string * Eliommod_parameters.param) list;get_params_type : ('get, 'tipo, 'getnames) Eliom_parameter.params_type;post_params_type : ('post, [ `WithoutSuffix ], 'postnames)
Eliom_parameter.params_type;max_use : int option;timeout : float option;meth : 'meth which_meth;kind : service_kind;info : 'attached attached_info;https : bool;keep_nl_params : [ `All | `Persistent | `None ];mutable send_appl_content : send_appl_content;mutable client_fun : ('get -> 'post -> result Lwt.t) option ref
Eliom_client_value.t
option;mutable reload_fun : reload_fun;service_mark : (unit,
unit,
'meth,
'attached,
'co,
'ext,
'reg,
suff,
unit,
unit,
unit)
t
Eliom_common.wrapper;} constraint 'tipo = [< suff ]val pre_applied_parameters :
('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t ->
(string * Eliommod_parameters.param) list Eliom_lib.String.Table.t
* (string * Eliommod_parameters.param) listval get_params_type :
('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ] as 'h, 'i, 'j, 'k) t ->
('a, 'h, 'i) Eliom_parameter.params_typeval post_params_type :
('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t ->
('b, [ `WithoutSuffix ], 'i) Eliom_parameter.params_typeval static_dir_ :
?https:bool ->
unit ->
(string list,
unit,
get,
att,
'a,
'b,
'c,
[ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name,
unit,
'd)
tStatic directories *
val static_dir :
unit ->
(string list,
unit,
get,
att,
'a,
'b,
'c,
[ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name,
unit,
'd)
tval https_static_dir :
unit ->
(string list,
unit,
get,
att,
'a,
'b,
'c,
[ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name,
unit,
'd)
tval get_static_dir_ :
?https:bool ->
?keep_nl_params:[ `All | `None | `Persistent ] ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type ->
unit ->
(string list * 'a,
unit,
get,
att,
'c,
'd,
'e,
[ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name * 'b,
unit,
'f)
tval static_dir_with_params :
?keep_nl_params:[ `All | `None | `Persistent ] ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type ->
unit ->
(string list * 'a,
unit,
get,
att,
'c,
'd,
'e,
[ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name * 'b,
unit,
'f)
tval https_static_dir_with_params :
?keep_nl_params:[ `All | `None | `Persistent ] ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type ->
unit ->
(string list * 'a,
unit,
get,
att,
'c,
'd,
'e,
[ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name * 'b,
unit,
'f)
tval send_appl_content :
('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t ->
send_appl_contentval set_send_appl_content :
('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t ->
send_appl_content ->
unitval add_non_localized_get_parameters :
params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.non_localized_params ->
service:('c, 'd, 'e, 'f, 'g, 'h, 'i, [< suff ] as 'j, 'k, 'l, 'm) t ->
('c * 'a, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k * 'b, 'l, 'n) tval add_non_localized_post_parameters :
params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.non_localized_params ->
service:('c, 'd, 'e, 'f, 'g, 'h, 'i, [< suff ] as 'j, 'k, 'l, 'm) t ->
('c, 'd * 'a, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l * 'b, 'n) ttype (_, _, _) path_option = | Path : Eliom_lib.Url.path -> (att, non_co, _) path_option| No_path : (non_att, co, unit) path_optionval main_service :
https:bool ->
prefix:string ->
path:Url.path ->
site_dir:string list ->
kind:service_kind ->
meth:'a which_meth ->
?redirect_suffix:bool ->
?keep_nl_params:[ `All | `None | `Persistent ] ->
?priority:int ->
get_params:('b, [< suff ] as 'c, 'd) Eliom_parameter.params_type ->
post_params:('e, [ `WithoutSuffix ], 'f) Eliom_parameter.params_type ->
reload_fun:reload_fun ->
unit ->
('b, 'e, 'a, att, 'g, 'h, 'i, 'c, 'd, 'f, 'j) tCreate a main service (not a coservice), internal or external