diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-02-22 09:05:19 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-02-22 09:05:19 (GMT) |
commit | 0d34530fe0c18ce39f163e5d711b355025cf129e (patch) | |
tree | d6a775b05eddbcbc84104e3559ffde1f5f4c1073 /Doc | |
parent | 42b33a4d1475f6ef6bdec93b9395eb2e50a5effe (diff) | |
parent | 1c5e715d8fac43ecf0dc9e13192b389910ae22e3 (diff) | |
download | cpython-0d34530fe0c18ce39f163e5d711b355025cf129e.zip cpython-0d34530fe0c18ce39f163e5d711b355025cf129e.tar.gz cpython-0d34530fe0c18ce39f163e5d711b355025cf129e.tar.bz2 |
Merge XML-RPC client documentation from 3.5
Diffstat (limited to 'Doc')
-rw-r--r-- | 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 index e199931..6500dfc 100644 --- a/Doc/library/xmlrpc.client.rst +++ b/Doc/library/xmlrpc.client.rst @@ -541,7 +541,7 @@ Example of Client Usage 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 @@ transport. The following example shows how: 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()) |