def _request(self, typ, id=<NUM_LIT:0>, method='<STR_LIT:GET>', params=None, data=None, url=None):
headers = { "<STR_LIT>": "<STR_LIT:application/json>" }<EOL>auth = None<EOL>if self.user:<EOL><INDENT>auth = (self.user, self.password)<EOL><DEDENT>if not url:<EOL><INDENT>if id:<EOL><INDENT>url = "<STR_LIT>" % (self.url, typ, id)<EOL><DEDENT>else:<EOL><INDENT>url = "<STR_LIT>" % (self.url, typ)<EOL><DEDENT><DEDENT>return requests.request(method, url, params=params, data=data, auth=auth, headers=headers)<EOL>
send the request, return response obj