How do I set a request timeout and cache policy in AFNetworking 2.0?
问题 I'm following the given example code AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager GET:@"http://example.com/resources.json" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"JSON: %@", responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@"Error: %@", error); }]; To change the timeout and cache policy I 'hacked' the library and created - (AFHTTPRequestOperation *)GET: