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