@@ -541,7 +541,7 @@ Example of Client Usage
541541 except Error as v:
542542 print("ERROR", v)
543543
544- To access an XML-RPC server through a proxy, you need to define a custom
544+ To access an XML-RPC server through a HTTP proxy, you need to define a custom
545545transport. The following example shows how:
546546
547547.. Example taken from http://lowlife.jp/nobonobo/wiki/xmlrpcwithproxy.html
@@ -555,16 +555,16 @@ transport. The following example shows how:
555555 self.proxy = proxy
556556 def make_connection(self, host):
557557 self.realhost = host
558- h = http.client.HTTP (self.proxy)
558+ h = http.client.HTTPConnection (self.proxy)
559559 return h
560- def send_request(self, connection, handler, request_body):
560+ def send_request(self, connection, handler, request_body, debug ):
561561 connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler))
562562 def send_host(self, connection, host):
563563 connection.putheader('Host', self.realhost)
564564
565565 p = ProxiedTransport()
566566 p.set_proxy('proxy-server:8080')
567- server = xmlrpc.client.Server ('http://time.xmlrpc.com/RPC2', transport=p)
567+ server = xmlrpc.client.ServerProxy ('http://time.xmlrpc.com/RPC2', transport=p)
568568 print(server.currentTime.getCurrentTime())
569569
570570
0 commit comments