Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
probablycorey committed Jul 14, 2010
1 parent cec9bef commit d6c5a79
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Simple Example
nil];

for (NSString *url in urls) {
SeriouslyOperation *o = [Seriously request:url options:nil handler:^(SeriouslyResponse *response, NSError *error) {
NSOperation *o = [Seriously request:url options:nil handler:^(id body,
NSHTTPURLResponse *response, NSError *error) {
NSLog(@"got %d (%@)", [urls indexOfObject:url], url);
}];
}
Expand All @@ -21,12 +22,12 @@ Parse JSON
----------
NSString *url = @"http://api.twitter.com/1/users/show.json?screen_name=probablycorey";

[Seriously get:url handler:^(SeriouslyResponse *response, NSError *error) {
[Seriously get:url handler:^(id body, NSHTTPURLResposne *response, NSError *error) {
if (error) {
NSLog(@"Got error %@", error);
}
else {
NSLog(@"Look, JSON gets parsed into an dictionary");
NSLog(@"%@", [response.body objectForKey:@"profile_background_image_url"]);
NSLog(@"%@", [body objectForKey:@"profile_background_image_url"]);
}
}];
}];

0 comments on commit d6c5a79

Please sign in to comment.