def _rest(url, req, data=None):
if url.upper().startswith("<STR_LIT>"):<EOL><INDENT>print("<STR_LIT>")<EOL>return "<STR_LIT>"<EOL><DEDENT>req = req.upper()<EOL>if req != "<STR_LIT:GET>" and req != "<STR_LIT>" and req != "<STR_LIT:POST>" and req != "<STR_LIT>":<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>status, body = _api_action(url, req, data)<EOL>if (int(status) >= <NUM_LIT:200> and int(status) <= <NUM_LIT>):<EOL><INDENT>return body<EOL><DEDENT>else:<EOL><INDENT>return body<EOL><DEDENT>
Send a rest rest request to the server.