def get_response(self, method, endpoint, headers=None, json=None, params=None, data=None):<EOL>
logger.debug("<STR_LIT>")<EOL>logger.debug("<STR_LIT>", endpoint)<EOL>logger.debug("<STR_LIT>", method)<EOL>logger.debug("<STR_LIT>", headers)<EOL>logger.debug("<STR_LIT>", json)<EOL>logger.debug("<STR_LIT>", params)<EOL>logger.debug("<STR_LIT>", data)<EOL>url = self.get_url(endpoint)<EOL>try:<EOL><INDENT>response = self.session.request(method=method, url=url, headers=headers, json=json,<EOL>params=params, data=data, proxies=self.proxies,<EOL>timeout=self.timeout)<EOL>logger.debug("<STR_LIT>", response.headers)<EOL>logger.debug("<STR_LIT>", response.content)<EOL><DEDENT>except RequestException as e:<EOL><INDENT>response = {"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": {"<STR_LIT:message>": e, "<STR_LIT:code>": BACKEND_ERROR},<EOL>"<STR_LIT>": {"<STR_LIT:message>": e, "<STR_LIT:code>": BACKEND_ERROR}}<EOL>raise BackendException(code=BACKEND_ERROR,<EOL>message=e,<EOL>response=response)<EOL><DEDENT>else:<EOL><INDENT>return response<EOL><DEDENT>
Returns the response from the requested endpoint with the requested method
:param method: str. one of the methods accepted by Requests ('POST', 'GET', ...)
:param endpoint: str. the relative endpoint to access
:param params: (optional) Dictionary or bytes to be sent in the query string
for the :class:`Request`.
:param data: (optional) Dictionary, bytes, or file-like object to send in the body
of the :class:`Request`.
:param json: (optional) json to send in the body of the :class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
:return: Requests.response