[ejabberd] Executing a command via mod_rest with blank options

Vineet Naik naikvin at gmail.com
Fri Sep 14 15:32:18 MSK 2012


Hi,

I am trying to execute the add_rosteritem command via mod_rest but not able
to pass a
blank nick and group.

If I execute the following command using ejabberdctl it works as expected.

ejabberdctl add_rosteritem pyclient1 localhost pyclient2 localhost \"\"
\"\" both

If I try to run the same command via mod_rest using a python script, it
says,

Error: the command "add_rosteritem" requires 2 more argument.

Here is the script I am using

def exec_command(cmd):
    resp = urllib2.urlopen(server_url, cmd)
    result = resp.read()
    return result

print exec_command(r'add_rosteritem pyclient1 kodecrm.kp pyclient2
kodecrm.kp \"\" \"\" both')

What am I missing?

-- 
Vineet Naik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120914/f827318c/attachment.html>


More information about the ejabberd mailing list