Skip to content

Instantly share code, notes, and snippets.

@jquave
Created February 28, 2013 05:29
Show Gist options
  • Save jquave/5054455 to your computer and use it in GitHub Desktop.
Save jquave/5054455 to your computer and use it in GitHub Desktop.
-(void)loginWithUser:(NSString*)username andPassword:(NSString *)password withSuccessCallbackObject:(NSObject *)obj andSelector:(SEL)_s {
callbackObject = [obj retain];
callbackSelector = _s;
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:kAppKeyzHost]];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:@"getuser" forKey:@"ApiAction"];
[request setPostValue:kAppToken forKey:@"AppToken"];
[request setPostValue:username forKey:@"Login"];
[request setPostValue:password forKey:@"Password"];
[request setDelegate:self];
[request startAsynchronous];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment