.TH "Eliom_uri" 3o 2014-07-10 OCamldoc "" .SH NAME Eliom_uri \- Low-level functions for relative or absolute URL calculation. .SH Module Module Eliom_uri .SH Documentation .sp Module .BI "Eliom_uri" : .B sig end .sp Low\-level functions for relative or absolute URL calculation\&. .sp .sp .sp .sp .PP .B === .B Compute service\&'s URL .B .B .B Please note that for many functions of this section, the returned .B URL depends on whether the function is called from a service .B handler or not: .B .B \- relative URL could not be computed outside of a service handler\&. .B \- "kept" non localized parameters outside a service handler are .B restricted to preapplied parameters\&. .B .B To define global link (i\&.e\&. outside of a service handler) and .B recompute a relative URL at each request, use .B Eliom_registration\&.Html5\&.a or other specialized functions from .B Eliom_registration\&.Html5\&. === .PP .I val make_string_uri : .B ?absolute:bool -> .B ?absolute_path:bool -> .B ?https:bool -> .B service:('get, unit, [< Eliom_service.get_service_kind ], .B [< Eliom_service.suff ], 'gn, unit, [< Eliom_service.registrable ], .B 'return) .B Eliom_service.service -> .B ?hostname:string -> .B ?port:int -> .B ?fragment:string -> .B ?keep_nl_params:[ `All | `None | `Persistent ] -> .B ?nl_params:Eliom_parameter.nl_params_set -> 'get -> string .sp The function .B make_string_uri ~service get_params creates the string corresponding to the URL of the service .B service applied to the GET parameters .B get_params \&. .sp See .B Eliom_registration\&.Html5\&.make_string_uri or any other .B Eliom_registration .B \&.*\&.make_string_uri for a detailled description of optional parameters\&. .sp .sp .I val make_uri_components : .B ?absolute:bool -> .B ?absolute_path:bool -> .B ?https:bool -> .B service:('get, unit, [< Eliom_service.get_service_kind ], .B [< Eliom_service.suff ], 'gn, unit, [< Eliom_service.registrable ], .B 'return) .B Eliom_service.service -> .B ?hostname:string -> .B ?port:int -> .B ?fragment:string -> .B ?keep_nl_params:[ `All | `None | `Persistent ] -> .B ?nl_params:Eliom_parameter.nl_params_set -> .B 'get -> string * (string * Eliommod_parameters.param) list * string option .sp The function .B make_uri_components service get_params returns the a triplet .B (path, get_params, fragment) that is a decomposition of the URL of .B service applied to the GET parameters .B get_params \&. .sp See .B Eliom_registration\&.Html5\&.make_uri_components or any other .B Eliom_registration .B \&.*\&.make_uri_components for a detailled description\&. .sp .sp .I val make_post_uri_components : .B ?absolute:bool -> .B ?absolute_path:bool -> .B ?https:bool -> .B service:('get, 'post, [< Eliom_service.post_service_kind ], .B [< Eliom_service.suff ], 'gn, 'pn, [< Eliom_service.registrable ], .B 'return) .B Eliom_service.service -> .B ?hostname:string -> .B ?port:int -> .B ?fragment:string -> .B ?keep_nl_params:[ `All | `None | `Persistent ] -> .B ?nl_params:Eliom_parameter.nl_params_set -> .B ?keep_get_na_params:bool -> .B 'get -> .B 'post -> .B string * (string * Eliommod_parameters.param) list * string option * .B (string * Eliommod_parameters.param) list .sp Same a .B Eliom_uri\&.make_uri_components , but also returns a table of post parameters\&. .sp .sp .I val make_string_uri_from_components : .B string * (string * Eliommod_parameters.param) list * string option -> string .sp The function .B make_string_uri_from_components path get_params .B fragment build the corresponding string URL\&. The .B path should be URL encoded\&. .sp The function .B Eliom_uri\&.make_string_uri is the composition of .B Eliom_uri\&.make_uri_components and .B make_string_uri_from_components \&. .sp .sp .PP .B === .B Relative paths .B === .PP .I val reconstruct_relative_url_path : .B string list -> string list -> string list .sp The function .B reconstruct_relative_url_path src dest returns a path to .B dest that is relative to .B src \&. .sp .sp