aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/xmlrpc.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/xmlrpc.lua b/util/xmlrpc.lua
index 0c6b5efe..2c256aa1 100644
--- a/util/xmlrpc.lua
+++ b/util/xmlrpc.lua
@@ -66,6 +66,14 @@ function create_error_response(faultCode, faultString)
return stanza;
end
+function create_request(method_name, object)
+ local stanza = st.stanza("methodCall")
+ :tag("methodName"):text(method_name):up()
+ :tag("params"):tag("param"):tag("value");
+ _lua_to_xmlrpc(stanza, object);
+ stanza:up():up():up();
+ return stanza;
+end
local _xmlrpc_to_lua;
local int_parse = function(stanza)