module Cookies:Eliom.ELIOMREGSIG1
with type page = page * cookieslist
type
page
val send : ?cookies:Extensions.cookieslist ->
?charset:string ->
?code:int ->
Eliom.server_params -> page -> Eliommod.result_to_send
val register : ?sp:Eliom.server_params ->
service:('a, 'b, [< Eliom.internal_service_kind ], [< Eliom.suff ], 'c, 'd,
[ `Registrable ])
Eliom.service ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> 'b -> page Lwt.t) -> unit
register service t f
will associate the service service
to the function f
.
f
is the function that creates a page.
It takes three parameters. The first one has type server_params
and allows to have acces to informations about the request.
The second and third ones are respectively GET and POST parameters.
For example if t
is (int "s"), then 'a
is int.
If you want to register a service in the global table after initialization,
you must add the ~sp
parameter (current server parameters).
Warning: 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 will be broken!
val register_for_session : Eliom.server_params ->
service:('a, 'b, [< Eliom.internal_service_kind ], [< Eliom.suff ], 'c, 'd,
[ `Registrable ])
Eliom.service ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> 'b -> page Lwt.t) -> unit
Warning:
val register_new_service : ?sp:Eliom.server_params ->
url:Eliom.url_path ->
get_params:('a, [< Eliom.suff ] as 'b, 'c) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of [> `Internal of [> `Service ] * [> `Get ] ] Eliom.a_s ], 'b,
'c, unit Eliom.param_name, [> `Registrable ])
Eliom.service
new_service
followed by register
val register_new_coservice : ?sp:Eliom.server_params ->
?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of [ `Internal of [ `Service ] * [ `Get ] ] Eliom.a_s ],
[ `WithoutSuffix ], unit Eliom.param_name, unit Eliom.param_name,
[< Eliom.registrable ])
Eliom.service ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of [> `Internal of [> `Coservice ] * [> `Get ] ] Eliom.a_s ],
[ `WithoutSuffix ], 'b, unit Eliom.param_name, [> `Registrable ])
Eliom.service
new_coservice
followed by register
val register_new_coservice' : ?sp:Eliom.server_params ->
?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit, [> `Nonattached of [> `Get ] Eliom.na_s ], [ `WithoutSuffix ], 'b,
unit Eliom.param_name, [> `Registrable ])
Eliom.service
new_coservice'
followed by register
val register_new_coservice_for_session : Eliom.server_params ->
?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of [ `Internal of [ `Service ] * [ `Get ] ] Eliom.a_s ],
[ `WithoutSuffix ], unit Eliom.param_name, unit Eliom.param_name,
[< Eliom.registrable ])
Eliom.service ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit,
[> `Attached of [> `Internal of [> `Coservice ] * [> `Get ] ] Eliom.a_s ],
[ `WithoutSuffix ], 'b, unit Eliom.param_name, [> `Registrable ])
Eliom.service
new_coservice
followed by register_for_session
val register_new_coservice_for_session' : Eliom.server_params ->
?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit, [> `Nonattached of [> `Get ] Eliom.na_s ], [ `WithoutSuffix ], 'b,
unit Eliom.param_name, [> `Registrable ])
Eliom.service
new_coservice'
followed by register_for_session
val register_new_post_service : ?sp:Eliom.server_params ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [ `Coservice | `Service ] * [ `Get ] ] Eliom.a_s ],
[< Eliom.suff ] as 'b, 'c, unit Eliom.param_name,
[< `Registrable ])
Eliom.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of
[> `Internal of [ `Coservice | `Service ] * [> `Post ] ] Eliom.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliom.service
new_post_service
followed by register
val register_new_post_coservice : ?sp:Eliom.server_params ->
?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [< `Coservice | `Service ] * [ `Get ] ]
Eliom.a_s ],
[< Eliom.suff ] as 'b, 'c, unit Eliom.param_name,
[< `Registrable ])
Eliom.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of [> `Internal of [> `Coservice ] * [> `Post ] ] Eliom.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliom.service
new_post_coservice
followed by register
val register_new_post_coservice' : ?sp:Eliom.server_params ->
?max_use:int ->
?timeout:float ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> unit -> 'a -> page Lwt.t) ->
(unit, 'a, [> `Nonattached of [> `Post ] Eliom.na_s ], [ `WithoutSuffix ],
unit Eliom.param_name, 'b, [> `Registrable ])
Eliom.service
new_post_coservice'
followed by register
val register_new_post_coservice_for_session : Eliom.server_params ->
?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[< `Attached of
[< `Internal of [< `Coservice | `Service ] * [ `Get ] ]
Eliom.a_s ],
[< Eliom.suff ] as 'b, 'c, unit Eliom.param_name,
[< `Registrable ])
Eliom.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> 'a -> 'd -> page Lwt.t) ->
('a, 'd,
[> `Attached of [> `Internal of [> `Coservice ] * [> `Post ] ] Eliom.a_s ],
'b, 'c, 'e, [> `Registrable ])
Eliom.service
new_post_coservice
followed by register_for_session
val register_new_post_coservice_for_session' : Eliom.server_params ->
?max_use:int ->
?timeout:float ->
post_params:('a, [ `WithoutSuffix ], 'b) Eliom.params_type ->
?error_handler:(Eliom.server_params ->
(string * exn) list -> page Lwt.t) ->
(Eliom.server_params -> unit -> 'a -> page Lwt.t) ->
(unit, 'a, [> `Nonattached of [> `Post ] Eliom.na_s ], [ `WithoutSuffix ],
unit Eliom.param_name, 'b, [> `Registrable ])
Eliom.service
new_post_coservice'
followed by register_for_session