Created
December 6, 2012 19:20
-
-
Save jlee42/4227441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *deviceUUID = [[NSUserDefaults standardUserDefaults] valueForKey:UUID_USER_DEFAULTS_KEY]; | |
NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys: | |
usernameField.text, @"user[pawsid]", | |
passwordField.text, @"user[password]", | |
deviceUUID, @"user[device_uuid]", nil]; | |
NSString *urlString = [NSString stringWithFormat:@"%@://%@:%@/api/v2/json/api_users/sign_in", | |
[NSObject TT_PROTOCOL], [NSObject TT_HOST], [NSObject TT_PORT]]; | |
[[RKObjectManager sharedManager].HTTPClient postPath:urlString parameters:params success:^(AFHTTPRequestOperation *operation, id JSON) | |
{ | |
// Success | |
NSLog(@"Success"); | |
} failure:^(AFHTTPRequestOperation *operation, NSError *error) | |
{ | |
// Error | |
NSLog(@"Error"); | |
}]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment