Fixing example in README to use NSOperationQueue instead of just calling -start on an operation
This commit is contained in:
parent
11cee66b6a
commit
b54dd95d2e
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http
|
||||||
AFJSONRequestOperation *operation = [AFJSONRequestOperation operationWithRequest:request success:^(id JSON) {
|
AFJSONRequestOperation *operation = [AFJSONRequestOperation operationWithRequest:request success:^(id JSON) {
|
||||||
NSLog(@"Name: %@ %@", [JSON valueForKeyPath:@"first_name"], [JSON valueForKeyPath:@"last_name"]);
|
NSLog(@"Name: %@ %@", [JSON valueForKeyPath:@"first_name"], [JSON valueForKeyPath:@"last_name"]);
|
||||||
}];
|
}];
|
||||||
[operation start];
|
[[NSOperationQueue mainQueue] addOperation:operation];
|
||||||
```
|
```
|
||||||
|
|
||||||
### Image Request
|
### Image Request
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue