AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
[manager GET:[NSString stringWithFormat:@"http://server.com/services/v2/item/%d?",myValue] parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"JSON: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
Instead of passing a NSDictionary
to parameters
, pass nil
. Then construct the URL with parameters with stringWithFormat
, and pass it to GET