def _http_response(self, url, method, data=None, **kwargs):
header = {'<STR_LIT>': '<STR_LIT:application/json>'}<EOL>if data:<EOL><INDENT>data = json.dumps(data)<EOL><DEDENT>path = url.format(**kwargs)<EOL>logger.debug("<STR_LIT>", method.__name__.upper(), path)<EOL>response = method(self.host + path,<EOL>data=data, headers=header, **self.method_kwargs)<EOL>logger.debug("<STR_LIT>", response.status_code, response.reason)<EOL>response.raise_for_status()<EOL>return response<EOL>
url -> full target url
           method -> method from requests
           data -> request body
           kwargs -> url formatting args