Skip to content

Instantly share code, notes, and snippets.

@tannerburson
Created July 18, 2010 04:03
Show Gist options
  • Save tannerburson/480104 to your computer and use it in GitHub Desktop.
Save tannerburson/480104 to your computer and use it in GitHub Desktop.
- (void)loadData {
GetWhateverRequest* req =
[[GetWhateverRequest alloc] initWithUsername:@"username" password:@"password";
[req fetch:self];
}
- (void)restRequestSuccess:(id)results {
NSLog(@"Woot. We're loading shit up!");
/**This particular call returns a hash/associate array/dictionary so let's cast to that **/
results = (NSDictionary*) results;
whateverLabel.text = [results valueForKey:@"whatever"];
}
- (void)restRequestFailure:(id)code message:(id)message {
/** Handle a failure here **/
NSLog(@"Something went wrong. do something about it ");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment