def rest(self, method, uri, data=None, status_codes=None, parse=True, **kwargs):
r = self.pool.request_encode_body(method, uri, fields=data, encode_multipart=False)<EOL>if not r.status in (status_codes if status_codes else (<NUM_LIT:200>,<NUM_LIT>)):<EOL><INDENT>print(cl('<STR_LIT>' % (uri, method), '<STR_LIT>'))<EOL>print(cl(data, '<STR_LIT>'))<EOL>print(r.headers)<EOL>raise Exception("<STR_LIT>" % r.status)<EOL><DEDENT>if not parse: <EOL><INDENT>"<STR_LIT>"<EOL>return r<EOL><DEDENT>if not self.debug_loads:<EOL><INDENT>"<STR_LIT>"<EOL>return loads(r.data)<EOL><DEDENT>"<STR_LIT>"<EOL>return self.debug(loads, args=(r_data, ), kwargs={},<EOL>fmt='<STR_LIT>', color='<STR_LIT>')<EOL>
Rest helpers