xmlrpc with Basic Auth

Discussion in 'Python' started by Milos Prudek, Sep 15, 2006.

  1. Milos Prudek

    Milos Prudek Guest

    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:pwd@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("user:pwd@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?

    --
    Milos Prudek
     
    Milos Prudek, Sep 15, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2hyaXMgTW9oYW4=?=

    Configuring Windows Auth & Forms Auth in Asp.Net

    =?Utf-8?B?Q2hyaXMgTW9oYW4=?=, Apr 28, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    712
    =?Utf-8?B?Q2hyaXMgTW9oYW4=?=
    Apr 28, 2004
  2. Etienne Posthumus
    Replies:
    1
    Views:
    1,113
    Roger Binns
    Apr 1, 2004
  3. Milos Prudek

    Re: xmlrpc with Basic Auth

    Milos Prudek, Sep 16, 2006, in forum: Python
    Replies:
    0
    Views:
    366
    Milos Prudek
    Sep 16, 2006
  4. Thomas Liesner

    xmlrpc an auth-diget

    Thomas Liesner, Jan 8, 2007, in forum: Python
    Replies:
    0
    Views:
    263
    Thomas Liesner
    Jan 8, 2007
  5. Thomas Liesner

    xmlrpc and auth-digest

    Thomas Liesner, Jan 8, 2007, in forum: Python
    Replies:
    1
    Views:
    435
    Laszlo Nagy
    Jan 8, 2007
Loading...

Share This Page