Milos Prudek wrote: > 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 "user:pwd" out of "user:[EMAIL PROTECTED]". But when I tried to > instantiate Server, it threw error "unsupported XML-RPC protocol". Here is a > snippet: > > from xmlrpclib import Server > s=Server("user:[EMAIL PROTECTED]://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? >
i'm currently using xmlrpclib with basic auth and i use it like this: from xmlrpclib import Server s=Server("http://user:[EMAIL PROTECTED]/rpc.php") bryan -- http://mail.python.org/mailman/listinfo/python-list