M
Milos Prudek
I need to use XML-RPC call with Basic Authorization in HTTP headers. I found
xmlrpclibBasicAuth.py, and it can be used as follows:
from xmlrpclibBasicAuth import Server
s=Server("http://www.example.com/rpc.php","user","pwd")
print s.system.listMethods()
Is this possible in plain xmlrpclib, without xmlrpclibBasicAuth.py?
I found the Transport class in xmlrpclib, and it has a method "get_host_info",
which parses "userwd" out of "userwd@host". But when I tried to
instantiate Server, it threw error "unsupported XML-RPC protocol". Here is a
snippet:
from xmlrpclib import Server
s=Server("userwd@http://www.example.com/rpc.php")
....
File "/usr/local/lib/python2.3/xmlrpclib.py", line 1293, in __init__
raise IOError, "unsupported XML-RPC protocol"
IOError: unsupported XML-RPC protocol
I know that I am using it incorrectly. Does the basic authentication support
in xmlrpclib mean something else than I take it for?
xmlrpclibBasicAuth.py, and it can be used as follows:
from xmlrpclibBasicAuth import Server
s=Server("http://www.example.com/rpc.php","user","pwd")
print s.system.listMethods()
Is this possible in plain xmlrpclib, without xmlrpclibBasicAuth.py?
I found the Transport class in xmlrpclib, and it has a method "get_host_info",
which parses "userwd" out of "userwd@host". But when I tried to
instantiate Server, it threw error "unsupported XML-RPC protocol". Here is a
snippet:
from xmlrpclib import Server
s=Server("userwd@http://www.example.com/rpc.php")
....
File "/usr/local/lib/python2.3/xmlrpclib.py", line 1293, in __init__
raise IOError, "unsupported XML-RPC protocol"
IOError: unsupported XML-RPC protocol
I know that I am using it incorrectly. Does the basic authentication support
in xmlrpclib mean something else than I take it for?