This is client API (go to server)

Warning: Reason support is experimental. We are looking for beta-tester and contributors.

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

type ('a, 'b, +'c, +'d, +'e, +'f, +'g, +'h) service

return type for service that are entry points for an application


Type of services.* 'get is the type of GET parameters

  • 'post is the type of POST parameters
  • 'kind is a subtype of Eliom_services.​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 Eliom_services.​registrable, telling if it is possible to register a handler on this service.
  • 'return is an information on what the service returns


val void_coservice' : 
  (unit, unit, [> `Nonattached of 'a na_s ],
   [ `WithoutSuffix ], unit, unit, [> `Unregistrable ], 'b)
  service

Void non-attached coservices


val https_void_coservice' : 
  (unit, unit, [> `Nonattached of 'a na_s ],
   [ `WithoutSuffix ], unit, unit, [> `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.

val void_hidden_coservice' : 
  (unit, unit, [> `Nonattached of 'a na_s ],
   [ `WithoutSuffix ], unit, unit, [> `Unregistrable ], 'b)
  service

The same, but forcing https.

val https_void_hidden_coservice' : 
  (unit, unit, [> `Nonattached of 'a na_s ],
   [ `WithoutSuffix ], unit, unit, [> `Unregistrable ], 'b)
  service

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, 'f, 'g, 'h, '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, 'f, 'g, 'h, '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