---
name: "Eliom_service.client"
section: "3o"
platform: "linux"
package: "libeliom-ocaml-doc"
version: "2.2.2-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/Eliom_service.client"
---

# Eliom\_service.client(3o)

Functions to add non localised parameters to services and client side declaration of void coservices.

## NAME

Eliom\_service - Functions to add non localised parameters to services and client side declaration of void coservices.

## Module

Module   Eliom\_service

## Documentation

Module **Eliom\_service**\
  :  **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\_service.service\_kind** .

\- **'d** is a phantom type, subtype of  **Eliom\_service.suff** stating the kind of parameters it uses: suffix or not.

\- **'e** is the type of GET parameters names. See  **Eliom\_parameter.param\_name** and form generation functions (e. g.  **Eliom\_registration.Html5.get\_form** ).

\- **'f** is the type of POST parameters names. See  **Eliom\_parameter.param\_name** and form generation functions (e. g.  **Eliom\_registration.Html5.post\_form** ).

\- **'g** is a phantom type,  subtype of  **Eliom\_service.registrable** , telling if it is possible to register a handler on this service.

\- **'h** is an information on what the service returns. See  **Eliom\_registration.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.

*val void\_hidden\_coservice'* :  **(unit, unit, \[\> \`Nonattached of 'a na\_s \], \[ \`WithoutSuffix \],** **unit, unit, \[\< registrable \> \`Unregistrable \], 'b)** **service**

The same, but forcing https.

*val https\_void\_hidden\_coservice'* :  **(unit, unit, \[\> \`Nonattached of 'a na\_s \], \[ \`WithoutSuffix \],** **unit, unit, \[\< registrable \> \`Unregistrable \], 'b)** **service**

Same as  **void\_coservice'** but keeps non attached GET parameters.

**=== The same, but forcing https. ===**

**===** **Miscellaneous** **===**

*val add\_non\_localized\_get\_parameters* :  **params:('a, \[ \`WithoutSuffix \], 'b) Eliom\_parameter.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**

**Localized parameters**

*val add\_non\_localized\_post\_parameters* :  **params:('a, \[ \`WithoutSuffix \], 'b) Eliom\_parameter.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 ===**

**===** **Static files** **===**

*val static\_dir* :  **unit -\>** **(string list, unit,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Service \] \], \[\> \`Get \]) a\_s \],** **\[ \`WithSuffix \], \[ \`One of string list \] Eliom\_parameter.param\_name,** **unit, \[\< registrable \> \`Unregistrable \], 'a)** **service**

The 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,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Service \] \], \[\> \`Get \]) a\_s \],** **\[ \`WithSuffix \], \[ \`One of string list \] Eliom\_parameter.param\_name,** **unit, \[\< registrable \> \`Unregistrable \], 'a)** **service**

Same as  **Eliom\_service.static\_dir** but forcing https link.

*val static\_dir\_with\_params* :  **?keep\_nl\_params:\[ \`All \| \`None \| \`Persistent \] -\>** **get\_params:('a, \[ \`WithoutSuffix \], 'b) Eliom\_parameter.params\_type -\>** **unit -\>** **(string list \* 'a, unit,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Service \] \], \[\> \`Get \]) a\_s \],** **\[ \`WithSuffix \], \[ \`One of string list \] Eliom\_parameter.param\_name \* 'b,** **unit, \[\< registrable \> \`Unregistrable \], 'c)** **service**

Like  **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 \], 'b) Eliom\_parameter.params\_type -\>** **unit -\>** **(string list \* 'a, unit,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Service \] \], \[\> \`Get \]) a\_s \],** **\[ \`WithSuffix \], \[ \`One of string list \] Eliom\_parameter.param\_name \* 'b,** **unit, \[\< registrable \> \`Unregistrable \], 'c)** **service**

Same as  **Eliom\_service.static\_dir\_with\_params** but forcing https link.
