Software /
code /
prosody
Changeset
1497:4c2c403ca04b
util.xmlrpc: Add create_request
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 08 Jul 2009 15:11:11 +0100 |
parents | 1496:4fa337035f46 |
children | 1498:481dfc89047a |
files | util/xmlrpc.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/xmlrpc.lua Wed Jul 08 04:32:02 2009 +0100 +++ b/util/xmlrpc.lua Wed Jul 08 15:11:11 2009 +0100 @@ -66,6 +66,14 @@ 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)