Version 0.99.5
This is a preliminary version of the documentation. Help us to improve it by filling tickets. We are looking for native english speakers to proof read the documentation. Contact us!
module Eliomservices:This module allows to define services.sig..end
val sync : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> 'd Lwt.tlet sync f sp g p = Lwt.return (f sp g p)type cookie = | | Set of |
| | Unset of |
val cookie_table_of_eliom_cookies : ?oldtable:Http_frame.cookieset ->
sp:Eliomsessions.server_params ->
cookie list -> Http_frame.cookieset?oldtable is present, cookies are added to this tabletype result_to_send = | | EliomResult of |
| | EliomExn of |
typesuff =[ `WithSuffix | `WithoutSuffix ]
typeservcoserv =[ `Coservice | `Service ]
typegetpost =[ `Get | `Post ]
typeattached_service_kind =[ `External | `Internal of servcoserv * getpost ]
typeget_attached_service_kind =[ `External | `Internal of servcoserv * [ `Get ] ]
typepost_attached_service_kind =[ `External | `Internal of servcoserv * [ `Post ] ]
typeinternal =[ `Internal of servcoserv * getpost ]
typeregistrable =[ `Registrable | `Unregistrable ]
type +'a a_s type +'a na_s typeservice_kind =[ `Attached of attached_service_kind a_s
| `Nonattached of getpost na_s ]
typeget_service_kind =[ `Attached of get_attached_service_kind a_s
| `Nonattached of [ `Get ] na_s ]
typepost_service_kind =[ `Attached of post_attached_service_kind a_s
| `Nonattached of [ `Post ] na_s ]
typeinternal_service_kind =[ `Attached of internal a_s
| `Nonattached of getpost na_s ]
typeattached =[ `Attached of attached_service_kind a_s ]
typenonattached =[ `Nonattached of getpost na_s ]
type ('a, 'b, +'c, +'d, +'e, +'f, +'g) service 'get is the type of GET parameters 'post is the type of POST parameters 'kind is a subtype of Eliomservices.service_kind (attached or non-attached service, internal or external, GET only or with POST parameters) 'tipo is a phantom type stating the kind of parameters it uses (suffix or not) 'getnames is the type of GET parameters names 'postnames is the type of POST parameters names 'registrable is a phantom type, subtype of Eliomservices.registrable, telling if it is possible to register a handler on this service.val new_service : ?sp:Eliomsessions.server_params ->
path:Extensions.url_path ->
get_params:('a, [< suff ] as 'b, 'c)
Eliomparameters.params_type ->
unit ->
('a, unit,
[> `Attached of
[> `Internal of [> `Service ] * [> `Get ] ] a_s ],
'b, 'c, unit, [> `Registrable ])
servicenew_service ~path:p ~get_params:pa () creates an Eliomservices.service associated to the path p, taking the GET parameters pa. Warning: If you use this function after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val new_service' : ?sp:Eliomsessions.server_params ->
name:string ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
unit ->
('a, unit, [> `Nonattached of [> `Get ] na_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
servicenew_service' ~name:n ~get_params:pa () creates a non-attached service associated to the name n, taking the GET parameters pa. Warning: If you use this function after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliommod.Eliom_function_forbidden_outside_site_loading.
val new_external_service : prefix:string ->
path:Extensions.url_path ->
get_params:('a, [< suff ] as 'b, 'c)
Eliomparameters.params_type ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
unit ->
('a, 'd, [> `Attached of [> `External ] a_s ], 'b, 'c, 'e,
[> `Unregistrable ])
service The parameter labelled ~path is the URL path, and each element of the list will be URL-encoded.
The parameter labelled ~prefix contains all what you want to put before the path. It usually starts with "http://" plus the name of the server. The whole URL is constructed from the prefix, the path and parameters. The prefix is not encoded. An empty prefix can be used to make a link to another site of the same server.
val new_post_service : ?sp:Eliomsessions.server_params ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [ `Coservice | `Service ] * [ `Get ] ]
a_s ],
[< suff ] as 'b, 'c, unit, [< `Registrable ])
service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
unit ->
('a, 'd,
[> `Attached of
[> `Internal of [ `Coservice | `Service ] * [> `Post ] ]
a_s ],
'b, 'c, 'e, [> `Registrable ])
servicefallback is the a service without POST parameters. You can't create an service with POST parameters if the same service does not exist without POST parameters. Thus, the user can't bookmark a page that does not exist.val new_post_service' : ?keep_get_na_params:bool ->
name:string ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
unit ->
(unit, 'a, [> `Nonattached of [> `Post ] na_s ],
[ `WithoutSuffix ], unit, 'b, [> `Registrable ])
servicename is the name of that non-attached service.val new_coservice : ?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of
[ `Internal of [ `Service ] * [ `Get ] ] a_s ],
[ `WithoutSuffix ], unit, unit, [< registrable ])
service ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
unit ->
('a, unit,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Get ] ] a_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
serviceval new_post_coservice : ?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [< `Coservice | `Service ] * [ `Get ] ]
a_s ],
[< suff ] as 'b, 'c, unit, [< `Registrable ])
service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
unit ->
('a, 'd,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Post ] ] a_s ],
'b, 'c, 'e, [> `Registrable ])
serviceval new_coservice' : ?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
unit ->
('a, unit, [> `Nonattached of [> `Get ] na_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
serviceval new_post_coservice' : ?max_use:int ->
?timeout:float ->
?keep_get_na_params:bool ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
unit ->
(unit, 'a, [> `Nonattached of [> `Post ] na_s ],
[ `WithoutSuffix ], unit, 'b, [> `Registrable ])
service~keep_get_na_params is false, GET non-attached parameters won't be kept in the URL (if any) when you create a POST form to this coservice. Default is true. See also Eliommkforms.ELIOMFORMSIG.post_form.val static_dir : sp:Eliomsessions.server_params ->
(string list, unit,
[> `Attached of
[> `Internal of [> `Service ] * [> `Get ] ] a_s ],
[ `WithSuffix ], [ `One of string list ] Eliomparameters.param_name,
unit, [> `Unregistrable ])
serviceval preapply : service:('a, 'b, [> `Attached of 'd a_s ] as 'c,
[< suff ], 'e, 'f, 'g)
service ->
'a ->
(unit, 'b, 'c, [ `WithoutSuffix ], unit, 'f, [> `Unregistrable ])
serviceval set_exn_handler : ?sp:Eliomsessions.server_params ->
(Eliomsessions.server_params -> exn -> result_to_send Lwt.t) ->
unit Warning: If you use this function after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliommod.Eliom_function_forbidden_outside_site_loading.