[Python-checkins] cpython (merge 3.5 -> default): Merge XML-RPC client documentation from 3.5

martin.panter python-checkins at python.org
Mon Feb 22 04:05:29 EST 2016


https://hg.python.org/cpython/rev/c2b594cecdcc
changeset:   100291:c2b594cecdcc
parent:      100289:45cf82f424ce
parent:      100290:cf842a8ccb77
user:        Martin Panter <vadmium+py at gmail.com>
date:        Mon Feb 22 09:05:19 2016 +0000
summary:
  Merge XML-RPC client documentation from 3.5

files:
  Doc/library/xmlrpc.client.rst |  8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst
--- a/Doc/library/xmlrpc.client.rst
+++ b/Doc/library/xmlrpc.client.rst
@@ -541,7 +541,7 @@
        except Error as v:
            print("ERROR", v)
 
-To access an XML-RPC server through a proxy, you need to define  a custom
+To access an XML-RPC server through a HTTP proxy, you need to define a custom
 transport.  The following example shows how:
 
 .. Example taken from http://lowlife.jp/nobonobo/wiki/xmlrpcwithproxy.html
@@ -555,16 +555,16 @@
            self.proxy = proxy
        def make_connection(self, host):
            self.realhost = host
-           h = http.client.HTTP(self.proxy)
+           h = http.client.HTTPConnection(self.proxy)
            return h
-       def send_request(self, connection, handler, request_body):
+       def send_request(self, connection, handler, request_body, debug):
            connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler))
        def send_host(self, connection, host):
            connection.putheader('Host', self.realhost)
 
    p = ProxiedTransport()
    p.set_proxy('proxy-server:8080')
-   server = xmlrpc.client.Server('http://time.xmlrpc.com/RPC2', transport=p)
+   server = xmlrpc.client.ServerProxy('http://time.xmlrpc.com/RPC2', transport=p)
    print(server.currentTime.getCurrentTime())
 
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list