def get_json(self, uri_path, http_method='<STR_LIT:GET>', query_parameters=None, body=None, headers=None):
query_parameters = query_parameters or {}<EOL>headers = headers or {}<EOL>query_parameters = self.add_credentials(query_parameters)<EOL>uri = self.build_request(uri_path, query_parameters)<EOL>if http_method in ('<STR_LIT:POST>', '<STR_LIT>', '<STR_LIT>') and '<STR_LIT:Content-Type>' not in headers:<EOL><INDENT>headers['<STR_LIT:Content-Type>'] = '<STR_LIT:application/json>'<EOL><DEDENT>headers['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>response, content = self.client.request(<EOL>uri=uri,<EOL>method=http_method,<EOL>body=body,<EOL>headers=headers<EOL>)<EOL>self.check_status(content, response)<EOL>return json.loads(content.decode('<STR_LIT:utf-8>'))<EOL>
Fetches the JSON returned, after making the call and checking for errors.
:param uri_path: Endpoint to be used to make a request.
:param http_method: HTTP method to be used.
:param query_parameters: Parameters to be added to the request.
:param body: Optional body, if required.
:param headers: Optional headers, if required.
:return: JSON