.TH "Eliom_s2s" 3o 2014-07-10 OCamldoc "" .SH NAME Eliom_s2s \- Server-to-Server communication module. .SH Module Module Eliom_s2s .SH Documentation .sp Module .BI "Eliom_s2s" : .B sig end .sp Server\-to\-Server communication module\&. Provides general function to communicate to other servers using post or get request\&. .sp .sp .sp .sp .I val format_url : .B string -> (string * string) list -> string .sp Format a url with a base and GET parameters .sp .sp .I val do_get_request : .B ?params:(string * string) list -> string -> Ocsigen_http_frame.t Lwt.t .sp Do a get request towards a given url .sp .sp .I val push_ns : .B ?sep:string -> .B ?namespace_param:string * 'a -> .B string -> (string * 'a) list -> (string * 'a) list .sp Given a list of .B (param, value) to be sent to the remote server, push a namespace at the beginning of the parameters .sp .sp .I val find_in_ns : .B ?namespace_param:string -> .B ?default_namespace:string -> 'a -> (string * 'a) list -> (string * 'a) list .sp Finds some parameters in a namespace, identified by its url\&. You can specify a default namespace, so .B find_in_ns do not fail when the url is not found\&. .sp .sp .I val strip_ns : .B string -> (string * string) list -> (string * string) list .sp Retrieves parameters beginning with the specified namespace and strips it\&. .sp .sp .I val parse_key_pairs : .B string -> (string * string) list .sp Parse an answer in the Key\-Value form : foo:bar foobar:value .sp .sp .I val direct_request : .B (string * string) list -> string -> (string * string) list Lwt.t .sp Perform a direct (POST) request towards a server, and parse the result as key\-value data .sp .sp