def request(self, method, path, query=None, data=None, redirects=True):
<EOL>self.__continue_session()<EOL>try:<EOL><INDENT>url = self.build_url(path)<EOL>method = method.upper()<EOL>self.__log('<STR_LIT>'.format(method, url))<EOL>if method == '<STR_LIT:POST>':<EOL><INDENT>request = self.__session.post(url, params=query, data=data, allow_redirects=redirects)<EOL><DEDENT>elif method == '<STR_LIT:GET>':<EOL><INDENT>request = self.__session.get(url, params=query, data=data, allow_redirects=redirects)<EOL><DEDENT>elif method == '<STR_LIT>':<EOL><INDENT>request = self.__session.head(url, params=query, data=data, allow_redirects=redirects)<EOL><DEDENT>elif method == '<STR_LIT>':<EOL><INDENT>request = self.__session.delete(url, params=query, data=data, allow_redirects=redirects)<EOL><DEDENT>else:<EOL><INDENT>raise SessionError('<STR_LIT>'.format(method))<EOL><DEDENT>self.last_response = request<EOL>self.__log('<STR_LIT>'.format(request.status_code))<EOL>self.last_request_time = time.time()<EOL><DEDENT>except (RequestException, ConnectionError, TooManyRedirects, HTTPError) as e:<EOL><INDENT>raise NetworkError('<STR_LIT>'.format(method, url), e)<EOL><DEDENT>except Timeout:<EOL><INDENT>raise NetworkError('<STR_LIT>'.format(method, url), e)<EOL><DEDENT>return request<EOL>
Sends HTTP request to LendingClub.

Parameters
----------
method : {GET, POST, HEAD, DELETE}
    The HTTP method to use: GET, POST, HEAD or DELETE
path : string
    The path that will be appended to the domain defined in :attr:`base_url`.
query : dict
    A dictionary of query string parameters
data : dict
    A dictionary of POST data values
redirects : boolean
    True to follow redirects, False to return the original response from the server.

Returns
-------
requests.Response
    A `requests.Response <http://docs.python-requests.org/en/latest/api/#requests.Response>`_ object