def request(self, host, handler, request_body, verbose):
headers = {'<STR_LIT>': self.user_agent,<EOL>'<STR_LIT:Content-Type>': '<STR_LIT>',<EOL>}<EOL>url = self._build_url(host, handler)<EOL>kwargs = {}<EOL>if StrictVersion(requests.__version__) >= StrictVersion('<STR_LIT>'):<EOL><INDENT>kwargs['<STR_LIT>']=True<EOL><DEDENT>else:<EOL><INDENT>if self.use_https:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>try:<EOL><INDENT>resp = requests.post(url, data=request_body, headers=headers,<EOL>**kwargs)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise<EOL><DEDENT>except Exception:<EOL><INDENT>raise <EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>resp.raise_for_status()<EOL><DEDENT>except requests.RequestException as e:<EOL><INDENT>raise xmlrpc.ProtocolError(url, resp.status_code, <EOL>str(e), resp.headers)<EOL><DEDENT>else:<EOL><INDENT>return self.parse_response(resp)<EOL><DEDENT><DEDENT>
Make an xmlrpc request.