title: Chain request using NSURLSessionDataTask
body: <p>I am to execute a chain of request using NSURLSessionDataTask. When first request finished, I need to use the responseData from the fist request to execute another multiple request. and In the end, I get the NSArray and give to to the table view. How to do that? As you can see below, it's not working.</p>
  
  <pre><code>NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
  AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:config];
  NSString *tvdbId = [[NSUserDefaults standardUserDefaults] objectForKey:@"tvdbId"];
  NSURL *urlString = [NSURL URLWithString:[NSString stringWithFormat:@"http://api.trakt.tv/show/seasons.json/%@/%@", kApiKey, tvdbId]];
  __weak EpisodeViewController *weakSelf = self;
  NSURLSessionDataTask *task = [manager dataTaskWithRequest:[NSURLRequest requestWithURL:urlString] completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
      if (!error) {
          NSArray *seasons = (NSArray *)responseObject;
          __block NSMutableArray *seasonArray = [NSMutableArray new];
  
          [seasons enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
              NSString *seasonNumber = obj[@"season"]; 
              NSURL *urlString = [NSURL URLWithString:[NSString stringWithFormat:@"http://api.trakt.tv/show/season.json/%@/%@/%@", kApiKey, tvdbId, seasonNumber]];
              NSURLSessionDataTask *eposideTask = [manager dataTaskWithRequest:[NSURLRequest requestWithURL:urlString] completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
                  NSArray *eposides = (NSArray *)responseObject;
                  NSDictionary *dict = @{@"season": seasonNumber, @"eposodes": eposides};
                  [seasonArray addObject:dict];
              }];
              [eposideTask resume];
          }];
          weakSelf.eposides = [NSArray arrayWithArray:seasonArray];
          NSLog(@"%@", weakSelf.eposides);
  
      }
  }];
  [task resume];
  </code></pre>