module type S =sig..end
See Eliom_service.create (on the server) for how to create
services.
include Eliom_service_sigs.TYPES
type att
type non_att
type 'a attached_info =
| |
Attached : |
| |
Nonattached : |
type ('get, 'post, 'meth, 'attached, 'co, 'ext, 'reg
, +[< `WithSuffix | `WithoutSuffix ], 'gn, 'pn, 'ret) t
Type of services
For a service
('get, 'post, 'meth, 'attached, 'co, 'ext, 'reg,
'tipo, 'gn, 'pn, 'ret) t:
'get is the type of GET parameters expected by the service.'post is the type of POST parameters expected by the service.'meth the HTTP method'attached attached or non-attached'co co-service or regular service'ext external or internal'reg: possible to register a handler on this service'tipo the type parameter of subtype suff states the kind
of parameters it uses: suffix or not.'gn is the type of GET parameters names. See
Eliom_parameter.param_name and form generation functions
(e. g. Eliom_content.Html.D.get_form ).'pn is the type of POST parameters names. See
Eliom_parameter.param_name and form generation functions
(e. g. Eliom_content.Html.D.post_form ). 'ret is an information on what the service returns. See
Eliom_registration.kind.type result =
| |
No_contents |
||||
| |
Dom of |
||||
| |
Redirect : |
||||
| |
Reload_action of |
typeunit_service =(unit, unit, get, att, non_co, non_ext, non_reg,
[ `WithoutSuffix ], unit, unit, non_ocaml)
t
type ('_, '_, '_) path_option =
| |
Path : |
| |
No_path : |
Optional service path
val reload_action : (unit, unit, get, non_att, co, non_ext, non_reg,
[ `WithoutSuffix ], unit, unit, non_ocaml)
tThe service reload_action is a predefined non-attached action
with special behaviour: it has no parameter at all, even
non-attached parameters. Use it if you want to make a link to
the current page without non-attached parameters. It is almost
equivalent to a POST non-attached service without POST
parameters, on which you register an action that does nothing,
but you can use it with <a> links, not only forms. It does not
keep non attached GET parameters.
val reload_action_https : (unit, unit, get, non_att, co, non_ext, non_reg,
[ `WithoutSuffix ], unit, unit, non_ocaml)
tLike Eliom_service_sigs.S.reload_action, but forces HTTPS
: (unit, unit, get, non_att, co, non_ext, non_reg,
[ `WithoutSuffix ], unit, unit, non_ocaml)
tLike Eliom_service_sigs.S.reload_action, but keeps non-attached GET
parameters.
: (unit, unit, get, non_att, co, non_ext, non_reg,
[ `WithoutSuffix ], unit, unit, non_ocaml)
tLike Eliom_service_sigs.S.reload_action_hidden, but forces HTTPS
val static_dir : unit ->
(string list, unit, get, att, non_co, non_ext, non_reg,
[ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name,
unit, non_ocaml)
tThe predefined service static_dir allows one to create links
to static files. This service takes the name of a static file as
a parameter (a string list, slash separated). The actual
directory in filesystem where static pages will be found must be
set up in the configuration file with the staticmod
extension.
val https_static_dir : unit ->
(string list, unit, get, att, non_co, non_ext, non_reg,
[ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name,
unit, non_ocaml)
tLike Eliom_service_sigs.S.static_dir, but forces HTTPS link
val static_dir_with_params : ?keep_nl_params:[ `All | `None | `Persistent ] ->
get_params:('a, [ `WithoutSuffix ], 'an) Eliom_parameter.params_type ->
unit ->
(string list * 'a, unit, get, att, non_co, non_ext,
non_reg, [ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name * 'an, unit, non_ocaml)
tLike Eliom_service_sigs.S.static_dir, but allows one to put GET parameters
val https_static_dir_with_params : ?keep_nl_params:[ `All | `None | `Persistent ] ->
get_params:('a, [ `WithoutSuffix ], 'an) Eliom_parameter.params_type ->
unit ->
(string list * 'a, unit, get, att, non_co, non_ext,
non_reg, [ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name * 'an, unit, non_ocaml)
tLike Eliom_service_sigs.S.static_dir_with_params, but forces HTTPS link
val preapply : service:('a, 'b, 'meth, att, 'co, 'ext, 'reg,
[< `WithSuffix | `WithoutSuffix ], 'e, 'f, 'return)
t ->
'a ->
(unit, 'b, 'meth, att, 'co, 'ext, non_reg,
[ `WithoutSuffix ], unit, 'f, 'return)
tThe function preapply ~service parameters creates a new
service by preapplying service to the GET parameters. It is
not possible to register a handler on an preapplied service;
preapplied services may be used in links or as fallbacks.
val add_non_localized_get_parameters : params:('p, [ `WithoutSuffix ], 'pn) Eliom_parameter.non_localized_params ->
service:('a, 'b, 'meth, 'attach, 'co, 'ext, 'reg,
[< `WithSuffix | `WithoutSuffix ] as 'c, 'e, 'f, 'return)
t ->
('a * 'p, 'b, 'meth, 'attach, 'co, 'ext, 'reg, 'c, 'e * 'pn, 'f, 'return)
tThe function add_non_localized_get_parameters ~params ~service
Adds non localized GET parameters params to service. See the
Eliom manual for more information about .
val add_non_localized_post_parameters : params:('p, [ `WithoutSuffix ], 'pn) Eliom_parameter.non_localized_params ->
service:('a, 'b, 'meth, 'attach, 'co, 'ext, 'g,
[< `WithSuffix | `WithoutSuffix ] as 'c, 'e, 'f, 'return)
t ->
('a, 'b * 'p, 'meth, 'attach, 'co, 'ext, 'g, 'c, 'e, 'f * 'pn, 'return)
tLike Eliom_service_sigs.S.add_non_localized_get_parameters but with POST
parameters.
val extern : ?keep_nl_params:[ `All | `None | `Persistent ] ->
prefix:string ->
path:Eliom_lib.Url.path ->
meth:('m, 'gp, 'gn, 'pp, 'pn, [< `WithSuffix | `WithoutSuffix ] as 'a, 'b)
meth ->
unit ->
('gp, 'pp, 'm, att, non_co, ext, non_reg, 'a, 'gn, 'pn,
non_ocaml)
textern ~prefix ~path ~meth () creates an external service,
i.e., a service implemented by a remote server (not necessarily
running Ocsigen/Eliom).