def request(self, method, uri, **kwargs):
response = make_tm_request(method, uri, auth=self.auth, **kwargs)<EOL>if method == "<STR_LIT>" or response.status == <NUM_LIT>:<EOL><INDENT>return response, {}<EOL><DEDENT>else:<EOL><INDENT>return response, json.loads(response.content.decode("<STR_LIT:utf-8>"))<EOL><DEDENT>
Send an HTTP request.

:param str method: "POST", "GET", "PUT" or "DELETE"
:param str uri:    URI to process request.
:raises :class:`TextmagicRestException`