module type ELIOMREGSIG1 =sig..end
type page
val send : ?cookies:Eliomservices.cookie list ->
?charset:string ->
?code:int ->
sp:Eliomsessions.server_params ->
page -> Eliomservices.result_to_send Lwt.tval register : ?sp:Eliomsessions.server_params ->
service:('a, 'b, [< Eliomservices.internal_service_kind ],
[< Eliomservices.suff ], 'c, 'd, [ `Registrable ])
Eliomservices.service ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'b -> page Lwt.t) ->
unitregister service t f will associate the service service
to the function f.
f is the function that creates a page, called service handler.
That function takes three parameters.
Eliomsessions.server_params
and allows to have acces to informations about the request and the session.t is Eliomparameters.int "s", then 'get is int.
Warning: If you want to register a service in the global table
after the initialisation phase,
you must give the ~sp parameter, otherwise it will raise the
exception Eliommod.Eliom_function_forbidden_outside_site_loading.
Registering services and coservices is always done in memory as there is no means of marshalling closures.
Registering after initialization is not encouraged for coservices
without timeout, as such services will be available only until the end
of the server process!
If you use that for main services, you will dynamically create new URLs!
This may be dangerous as they will disappear if you stop the server.
Be very careful to re-create these URLs when you relaunch the server,
otherwise, some external links or bookmarks may be broken!
val register_for_session : ?session_name:string ->
sp:Eliomsessions.server_params ->
service:('a, 'b, [< Eliomservices.internal_service_kind ],
[< Eliomservices.suff ], 'c, 'd, [ `Registrable ])
Eliomservices.service ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'b -> page Lwt.t) ->
unitWarning:
val register_new_service : ?sp:Eliomsessions.server_params ->
path:Extensions.url_path ->
get_params:('a, [< Eliomservices.suff ] as 'b, 'c)
Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of
[> `Internal of [> `Service ] * [> `Get ] ] Eliomservices.a_s ],
'b, 'c, unit, [> `Registrable ])
Eliomservices.servicenew_service followed by registerval register_new_coservice : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of
[ `Internal of [ `Service ] * [ `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], unit, unit, [< Eliomservices.registrable ])
Eliomservices.service ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.servicenew_coservice followed by registerval register_new_coservice' : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit, [> `Nonattached of [> `Get ] Eliomservices.na_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.servicenew_coservice' followed by registerval register_new_coservice_for_session : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of
[ `Internal of [ `Service ] * [ `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], unit, unit, [< Eliomservices.registrable ])
Eliomservices.service ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Get ] ] Eliomservices.a_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.servicenew_coservice followed by register_for_sessionval register_new_coservice_for_session' : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> unit -> page Lwt.t) ->
('a, unit, [> `Nonattached of [> `Get ] Eliomservices.na_s ],
[ `WithoutSuffix ], 'b, unit, [> `Registrable ])
Eliomservices.servicenew_coservice' followed by register_for_sessionval register_new_post_service : ?sp:Eliomsessions.server_params ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [ `Coservice | `Service ] * [ `Get ] ]
Eliomservices.a_s ],
[< Eliomservices.suff ] as 'b, 'c, unit, [< `Registrable ])
Eliomservices.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of
[> `Internal of [ `Coservice | `Service ] * [> `Post ] ]
Eliomservices.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliomservices.servicenew_post_service followed by registerval register_new_post_coservice : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [< `Coservice | `Service ] * [ `Get ] ]
Eliomservices.a_s ],
[< Eliomservices.suff ] as 'b, 'c, unit, [< `Registrable ])
Eliomservices.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Post ] ] Eliomservices.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliomservices.servicenew_post_coservice followed by registerval register_new_post_coservice' : ?sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
unit -> 'a -> page Lwt.t) ->
(unit, 'a, [> `Nonattached of [> `Post ] Eliomservices.na_s ],
[ `WithoutSuffix ], unit, 'b, [> `Registrable ])
Eliomservices.servicenew_post_coservice' followed by registerval register_new_post_coservice_for_session : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [< `Coservice | `Service ] * [ `Get ] ]
Eliomservices.a_s ],
[< Eliomservices.suff ] as 'b, 'c, unit, [ `Registrable ])
Eliomservices.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of
[> `Internal of [> `Coservice ] * [> `Post ] ] Eliomservices.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliomservices.servicenew_post_coservice followed by register_for_sessionval register_new_post_coservice_for_session' : ?session_name:string ->
sp:Eliomsessions.server_params ->
?max_use:int ->
?timeout:float ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliomparameters.params_type ->
?error_handler:(Eliomsessions.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliomsessions.server_params ->
unit -> 'a -> page Lwt.t) ->
(unit, 'a, [> `Nonattached of [> `Post ] Eliomservices.na_s ],
[ `WithoutSuffix ], unit, 'b, [> `Registrable ])
Eliomservices.servicenew_post_coservice' followed by register_for_session