def make_request(self, url, method='<STR_LIT>', headers=None, data=None,<EOL>callback=None, errors=STRICT, verify=False, timeout=None, **params):
error_modes = (STRICT, GRACEFUL, IGNORE)<EOL>error_mode = errors or GRACEFUL<EOL>if error_mode.lower() not in error_modes:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>% '<STR_LIT:U+002C>'.join(error_modes))<EOL><DEDENT>if callback is None:<EOL><INDENT>callback = self._default_resp_callback<EOL><DEDENT>request = getattr(requests, method.lower())<EOL>log.debug('<STR_LIT>' % url)<EOL>log.debug('<STR_LIT>' % method)<EOL>log.debug('<STR_LIT>' % params)<EOL>log.debug('<STR_LIT>' % headers)<EOL>log.debug('<STR_LIT>' % timeout)<EOL>r = request(<EOL>url, headers=headers, data=data, verify=verify, timeout=timeout, params=params)<EOL>log.debug('<STR_LIT>' % r.url)<EOL>try:<EOL><INDENT>r.raise_for_status()<EOL>return callback(r)<EOL><DEDENT>except Exception as e:<EOL><INDENT>return self._with_error_handling(r, e,<EOL>error_mode, self.response_format)<EOL><DEDENT>
Reusable method for performing requests.
:param url - URL to request
:param method - request method, default is 'get'
:param headers - request headers
:param data - post data
:param callback - callback to be applied to response,
                  default callback will parse response as json object.
:param errors - specifies communication errors handling mode, possible
                values are:
                 * strict (default) - throw an error as soon as one
                    occurred
                 * graceful - ignore certain errors, e.g. EmptyResponse
                 * ignore - ignore all errors and return a result in
                            any case.
                            NOTE that it DOES NOT mean that no
                            exceptions can be
                            raised from this method, it mostly ignores
                            communication
                            related errors.
                 * None or empty string equals to default
:param verify - whether or not to verify SSL cert, default to False
:param timeout - the timeout of the request in second, default to None
:param params - additional query parameters for request