Module Eliom_services
module Eliom_services : sig..end
Functions to add non localised parameters to services and client side declaration of void coservices. Void coservices are the only ones defined on client side.
type suff = [ `WithSuffix | `WithoutSuffix ]
Types of services ¶
type servcoserv = [ `Coservice | `Service ]
type getpost = [ `Get | `Post ]
type attached_service_kind = [ `External | `Internal of servcoserv ]
type internal = [ `Internal of servcoserv ]
type registrable = [ `Registrable | `Unregistrable ]
type (+'a, +'b) a_s
You can call register function only on registrable services
type +'a na_s
type service_kind =
[ `Attached of
(attached_service_kind, getpost)
a_s
| `Nonattached of getpost na_s ]
type internal_service_kind =
[ `Attached of
(internal, getpost)
a_s
| `Nonattached of getpost na_s ]
type get_service_kind =
[ `Attached of
(attached_service_kind, [ `Get ])
a_s
| `Nonattached of [ `Get ] na_s ]
type post_service_kind =
[ `Attached of
(attached_service_kind, [ `Post ])
a_s
| `Nonattached of [ `Post ] na_s ]
type attached =
[ `Attached of
(attached_service_kind, getpost)
a_s ]
type nonattached = [ `Nonattached of getpost na_s ]
type http
type appl_service
default return type for services
return type for service that are entry points for an application
type
('a, 'b, +'c, +[< suff ], +'d, +'e
, +[< registrable ], +'f) service
Type of services.
- 'a is the type of GET parameters expected by the service.
- 'b is the type of POST parameters expected by the service.
- 'c describes the services's kind: attached or non-attached, internal or external, GET only or with POST parameters. It is a subtype of Eliom_services.service_kind.
- 'd is a phantom type, subtype of Eliom_services.suff stating the kind of parameters it uses: suffix or not.
- 'e is the type of GET parameters names. See Eliom_parameters.param_name and form generation functions (e. g. Eliom_output.Html5.get_form).
- 'f is the type of POST parameters names. See Eliom_parameters.param_name and form generation functions (e. g. Eliom_output.Html5.post_form).
- 'g is a phantom type, subtype of Eliom_services.registrable, telling if it is possible to register a handler on this service.
- 'h is an information on what the service returns. See Eliom_output.kind.
val void_coservice' :
(unit, unit, [> `Nonattached of 'a na_s ],
[ `WithoutSuffix ], unit, unit,
[< registrable > `Unregistrable ], 'b)
service
Void non-attached coservices ¶
val https_void_coservice' :
(unit, unit, [> `Nonattached of 'a na_s ],
[ `WithoutSuffix ], unit, unit,
[< registrable > `Unregistrable ], 'b)
service
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.
The same, but forcing https.
Same as void_coservice' but keeps non attached GET parameters.
The same, but forcing https.
val add_non_localized_get_parameters :
params:('a, [ `WithoutSuffix ], 'b)
Eliom_parameters.non_localized_params ->
service:('c, 'd, 'e, [< suff ] as 'f, 'g, 'h,
[< registrable ] as 'i, 'j)
service ->
('c * 'a, 'd, 'e, 'f, 'g * 'b, 'h, 'i, 'j) service
Miscellaneous ¶
val add_non_localized_post_parameters :
params:('a, [ `WithoutSuffix ], 'b)
Eliom_parameters.non_localized_params ->
service:('c, 'd, 'e, [< suff ] as 'f, 'g, 'h,
[< registrable ] as 'i, 'j)
service ->
('c, 'd * 'a, 'e, 'f, 'g, 'h * 'b, 'i, 'j) service
Adds non localized GET parameters to a service
Adds non localized POST parameters to a service
