--- Prosody IM v0.4
--- Copyright (C) 2008-2009 Matthew Wild
--- Copyright (C) 2008-2009 Waqas Hussain
+-- Prosody IM
+-- Copyright (C) 2008-2010 Matthew Wild
+-- Copyright (C) 2008-2010 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
local t_insert = table.insert;
local tostring = tostring;
local tonumber = tonumber;
+local select = select;
local st = require "util.stanza";
module "xmlrpc"
return stanza;
end
-function create_request(method_name, object)
+function create_request(method_name, ...)
local stanza = st.stanza("methodCall")
:tag("methodName"):text(method_name):up()
- :tag("params"):tag("param"):tag("value");
- _lua_to_xmlrpc(stanza, object);
+ :tag("params");
+ for i=1,select('#', ...) do
+ stanza:tag("param"):tag("value");
+ _lua_to_xmlrpc(stanza, select(i, ...));
+ stanza:up():up();
+ end
stanza:up():up():up();
return stanza;
end