def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
try:<EOL><INDENT>conn = self.get_connection(request.url, proxies)<EOL><DEDENT>except LocationValueError as e:<EOL><INDENT>raise InvalidURL(e, request=request)<EOL><DEDENT>self.cert_verify(conn, request.url, verify, cert)<EOL>url = self.request_url(request, proxies)<EOL>self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)<EOL>chunked = not (request.body is None or '<STR_LIT>' in request.headers)<EOL>if isinstance(timeout, tuple):<EOL><INDENT>try:<EOL><INDENT>connect, read = timeout<EOL>timeout = TimeoutSauce(connect=connect, read=read)<EOL><DEDENT>except ValueError as e:<EOL><INDENT>err = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(timeout))<EOL>raise ValueError(err)<EOL><DEDENT><DEDENT>elif isinstance(timeout, TimeoutSauce):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>timeout = TimeoutSauce(connect=timeout, read=timeout)<EOL><DEDENT>try:<EOL><INDENT>if not chunked:<EOL><INDENT>resp = conn.urlopen(<EOL>method=request.method,<EOL>url=url,<EOL>body=request.body,<EOL>headers=request.headers,<EOL>redirect=False,<EOL>assert_same_host=False,<EOL>preload_content=False,<EOL>decode_content=False,<EOL>retries=self.max_retries,<EOL>timeout=timeout<EOL>)<EOL><DEDENT>else:<EOL><INDENT>if hasattr(conn, '<STR_LIT>'):<EOL><INDENT>conn = conn.proxy_pool<EOL><DEDENT>low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT)<EOL>try:<EOL><INDENT>low_conn.putrequest(request.method,<EOL>url,<EOL>skip_accept_encoding=True)<EOL>for header, value in request.headers.items():<EOL><INDENT>low_conn.putheader(header, value)<EOL><DEDENT>low_conn.endheaders()<EOL>for i in request.body:<EOL><INDENT>low_conn.send(hex(len(i))[<NUM_LIT:2>:].encode('<STR_LIT:utf-8>'))<EOL>low_conn.send(b'<STR_LIT:\r\n>')<EOL>low_conn.send(i)<EOL>low_conn.send(b'<STR_LIT:\r\n>')<EOL><DEDENT>low_conn.send(b'<STR_LIT>')<EOL>try:<EOL><INDENT>r = low_conn.getresponse(buffering=True)<EOL><DEDENT>except TypeError:<EOL><INDENT>r = low_conn.getresponse()<EOL><DEDENT>resp = HTTPResponse.from_httplib(<EOL>r,<EOL>pool=conn,<EOL>connection=low_conn,<EOL>preload_content=False,<EOL>decode_content=False<EOL>)<EOL><DEDENT>except:<EOL><INDENT>low_conn.close()<EOL>raise<EOL><DEDENT><DEDENT><DEDENT>except (ProtocolError, socket.error) as err:<EOL><INDENT>raise ConnectionError(err, request=request)<EOL><DEDENT>except MaxRetryError as e:<EOL><INDENT>if isinstance(e.reason, ConnectTimeoutError):<EOL><INDENT>if not isinstance(e.reason, NewConnectionError):<EOL><INDENT>raise ConnectTimeout(e, request=request)<EOL><DEDENT><DEDENT>if isinstance(e.reason, ResponseError):<EOL><INDENT>raise RetryError(e, request=request)<EOL><DEDENT>if isinstance(e.reason, _ProxyError):<EOL><INDENT>raise ProxyError(e, request=request)<EOL><DEDENT>if isinstance(e.reason, _SSLError):<EOL><INDENT>raise SSLError(e, request=request)<EOL><DEDENT>raise ConnectionError(e, request=request)<EOL><DEDENT>except ClosedPoolError as e:<EOL><INDENT>raise ConnectionError(e, request=request)<EOL><DEDENT>except _ProxyError as e:<EOL><INDENT>raise ProxyError(e)<EOL><DEDENT>except (_SSLError, _HTTPError) as e:<EOL><INDENT>if isinstance(e, _SSLError):<EOL><INDENT>raise SSLError(e, request=request)<EOL><DEDENT>elif isinstance(e, ReadTimeoutError):<EOL><INDENT>raise ReadTimeout(e, request=request)<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>return self.build_response(request, resp)<EOL>
Sends PreparedRequest object. Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls whether
            we verify the server's TLS certificate, or a string, in which case it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        :rtype: requests.Response