Skip to content

Instantly share code, notes, and snippets.

@jyaunches
Created March 4, 2013 15:55
Show Gist options
  • Save jyaunches/5083231 to your computer and use it in GitHub Desktop.
Save jyaunches/5083231 to your computer and use it in GitHub Desktop.
Basic AF Networking request implementation
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:@"http://someurl/blah];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id resultJSON) {
[self processResult:resultJSON];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
[self processFailuer:error];
}];
[operation start];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment