MCPcopy Index your code
hub / github.com/python/cpython / parse_response

Method parse_response

Lib/xmlrpc/client.py:1303–1325  ·  view source on GitHub ↗
(self, response)

Source from the content-addressed store, hash-verified

1301 # @return Response tuple and target method.
1302
1303 def parse_response(self, response):
1304 # read response data from httpresponse, and parse it
1305 # Check for new http response object, otherwise it is a file object.
1306 if hasattr(response, 'getheader'):
1307 if response.getheader("Content-Encoding", "") == "gzip":
1308 stream = GzipDecodedResponse(response)
1309 else:
1310 stream = response
1311 else:
1312 stream = response
1313
1314 p, u = self.getparser()
1315
1316 while data := stream.read(1024):
1317 if self.verbose:
1318 print("body:", repr(data))
1319 p.feed(data)
1320
1321 if stream is not response:
1322 stream.close()
1323 p.close()
1324
1325 return u.close()
1326
1327##
1328# Standard transport class for XML-RPC over HTTPS.

Callers 1

single_requestMethod · 0.95

Calls 7

getparserMethod · 0.95
closeMethod · 0.95
GzipDecodedResponseClass · 0.85
getheaderMethod · 0.80
readMethod · 0.45
feedMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected