#NEWLINE# def request( self , method , url , params = None , data = None , headers = None , cookies = None , files = None , auth = None , timeout = None , allow_redirects = True , proxies = None , hooks = None , stream = None , verify = None , cert = None , json = None ) : #NEWLINE# #INDENT# "Constructs a :class:`Request <Request>`, prepares it and sends it.\n        Returns :class:`Response <Response>` object.\n\n        :param method: method for the new :class:`Request` object.\n        :param url: URL for the new :class:`Request` object.\n        :param params: (optional) Dictionary or bytes to be sent in the query\n            string for the :class:`Request`.\n        :param data: (optional) Dictionary, bytes, or file-like object to send\n            in the body of the :class:`Request`.\n        :param json: (optional) json to send in the body of the\n            :class:`Request`.\n        :param headers: (optional) Dictionary of HTTP Headers to send with the\n            :class:`Request`.\n        :param cookies: (optional) Dict or CookieJar object to send with the\n            :class:`Request`.\n        :param files: (optional) Dictionary of ``'filename': file-like-objects``\n            for multipart encoding upload.\n        :param auth: (optional) Auth tuple or callable to enable\n            Basic/Digest/Custom HTTP Auth.\n        :param timeout: (optional) How long to wait for the server to send\n            data before giving up, as a float, or a :ref:`(connect timeout,\n            read timeout) <timeouts>` tuple.\n        :type timeout: float or tuple\n        :param allow_redirects: (optional) Set to True by default.\n        :type allow_redirects: bool\n        :param proxies: (optional) Dictionary mapping protocol or protocol and\n            hostname to the URL of the proxy.\n        :param stream: (optional) whether to immediately download the response\n            content. Defaults to ``False``.\n        :param verify: (optional) if ``True``, the SSL cert will be verified.\n            A CA_BUNDLE path can also be provided.\n        :param cert: (optional) if String, path to ssl client cert file (.pem).\n            If Tuple, ('cert', 'key') pair.\n        " #NEWLINE# req = Request ( method = method . upper ( ) , url = url , headers = headers , files = files , data = ( data or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , json = json , params = ( params or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , auth = auth , cookies = cookies , hooks = hooks ) #NEWLINE# prep = self . prepare_request ( req ) #NEWLINE# proxies = ( proxies or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# settings = self . merge_environment_settings ( prep . url , proxies , timeout , verify , cert ) #NEWLINE# send_kwargs = { #NEWLINE# #INDENT# 'timeout' : timeout , #NEWLINE# 'allow_redirects' : allow_redirects , #NEWLINE# #UNINDENT# } #NEWLINE# send_kwargs . update ( settings ) #NEWLINE# resp = self . send ( prep , ** send_kwargs ) #NEWLINE# return resp