Skip to content

Instantly share code, notes, and snippets.

@peerasak-u
Created October 8, 2013 03:25
Show Gist options
  • Select an option

  • Save peerasak-u/6879004 to your computer and use it in GitHub Desktop.

Select an option

Save peerasak-u/6879004 to your computer and use it in GitHub Desktop.
- (void)logInWithUsername:(NSString *)username password:(NSString *)password
{
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://fireoneone.com/dummy_login.php"]];
request = [ASIFormDataRequest requestWithURL:url];
[request setRequestMethod:@"POST"];
[request setPostValue:usernameInput forKey:@"username"];
[request setPostValue:passwordOutput forKey:@"password"];
[request setDelegate:self];
[request startAsynchronous];
[request setDidFinishSelector:@selector(logInSuccessed:)];
[request setDidFailSelector:@selector(logInFailed:)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment