---
name: "Eliom_uri.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_uri.client"
---

# Eliom\_uri.client(3o)

Low-level functions for relative or absolute URL calculation.

## NAME

Eliom\_uri - Low-level functions for relative or absolute URL calculation.

## Module

Module   Eliom\_uri

## Documentation

Module **Eliom\_uri**\
  :  **sig end**

Low-level functions for relative or absolute URL calculation.

**===** **Compute service's URL** **Please note that for many functions of this section, the returned** **URL depends on whether the function is called from a service** **handler or not:** **- relative URL could not be computed outside of a service handler.** **- kept non localized parameters outside a service handler are** **restricted to preapplied parameters.** **To define global link (i.e. outside of a service handler) and** **recompute a relative URL at each request, use** **Eliom\_registration.Html5.a or other specialized functions from** **Eliom\_registration.Html5 or Eliom\_registration.Xhtml. ===**

*val make\_string\_uri* :  **?absolute:bool -\>** **?absolute\_path:bool -\>** **?https:bool -\>** **service:('a, unit, \[\< Eliom\_service.get\_service\_kind \],** **\[\< Eliom\_service.suff \], 'b, unit, \[\< Eliom\_service.registrable \],** **'c)** **Eliom\_service.service -\>** **?hostname:string -\>** **?port:int -\>** **?fragment:string -\>** **?keep\_nl\_params:\[ \`All \| \`None \| \`Persistent \] -\>** **?nl\_params:Eliom\_parameter.nl\_params\_set -\> 'a -\> string**

The function  **make\_string\_uri ~service get\_params** creates the string corresponding to the URL of the service  **service** applied to the GET parameters  **get\_params** .

See  **Eliom\_registration.Html5.make\_string\_uri** or any other **Eliom\_registration** **.\*.make\_string\_uri** for a detailled description of optional parameters.

*val make\_uri\_components* :  **?absolute:bool -\>** **?absolute\_path:bool -\>** **?https:bool -\>** **service:('a, unit, \[\< Eliom\_service.get\_service\_kind \],** **\[\< Eliom\_service.suff \], 'b, unit, \[\< Eliom\_service.registrable \],** **'c)** **Eliom\_service.service -\>** **?hostname:string -\>** **?port:int -\>** **?fragment:string -\>** **?keep\_nl\_params:\[ \`All \| \`None \| \`Persistent \] -\>** **?nl\_params:Eliom\_parameter.nl\_params\_set -\>** **'a -\> string \* (string \* string) list \* string option**

The function  **make\_uri\_components service get\_params** returns the a triplet  **(path, get\_params, fragment)** that is a decomposition of the URL of  **service** applied to the GET parameters **get\_params** .

See  **Eliom\_registration.Html5.make\_uri\_components** or any other **Eliom\_registration** **.\*.make\_uri\_components** for a detailled description.

*val make\_post\_uri\_components* :  **?absolute:bool -\>** **?absolute\_path:bool -\>** **?https:bool -\>** **service:('a, 'b, \[\< Eliom\_service.post\_service\_kind \],** **\[\< Eliom\_service.suff \], 'c, 'd, \[\< Eliom\_service.registrable \], 'e)** **Eliom\_service.service -\>** **?hostname:string -\>** **?port:int -\>** **?fragment:string -\>** **?keep\_nl\_params:\[ \`All \| \`None \| \`Persistent \] -\>** **?nl\_params:Eliom\_parameter.nl\_params\_set -\>** **?keep\_get\_na\_params:bool -\>** **'a -\>** **'b -\>** **string \* (string \* string) list \* string option \* (string \* string) list**

Same a  **Eliom\_uri.make\_uri\_components** , but also returns a table of post parameters.

*val make\_string\_uri\_from\_components* :  **string \* (string \* string) list \* string option -\> string**

The function  **make\_string\_uri\_from\_components path get\_params** **fragment** build the corresponding string URL. The  **path** should be URL encoded.

The function  **Eliom\_uri.make\_string\_uri** is the composition of **Eliom\_uri.make\_uri\_components** and  **make\_string\_uri\_from\_components** .

**===** **Relative paths** **===**

*val reconstruct\_relative\_url\_path* :  **string list -\> string list -\> string list**

The function  **reconstruct\_relative\_url\_path src dest** returns a path to  **dest** that is relative to  **src** .
