Skip to content

Instantly share code, notes, and snippets.

@jlee42
Created January 22, 2013 00:05
Show Gist options
  • Save jlee42/4590759 to your computer and use it in GitHub Desktop.
Save jlee42/4590759 to your computer and use it in GitHub Desktop.
[[RKObjectManager sharedManager].HTTPClient postPath:@"http://localhost:3000/api/v1/json/api_users/sign_in" parameters:params success:^(AFHTTPRequestOperation *operation, id JSON)
{
// Success
[[NSUserDefaults standardUserDefaults] setValue:[JSON valueForKey:@"auth_token"] forKey:@"authentication_token"];
} failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
// Error
NSLog(@"Error: %@", [error localizedDescription]);
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment