title: How to get data from blocks using NSURLSession?
body: <p>I have problem with this block. I trying to get the data inside the block of <code>NSURLSession</code>.</p>
  
  <p>here's my code</p>
  
  <pre><code>-(NSDictionary *) RetrieveData{
  
      NSURLSession * session = [NSURLSession sharedSession];
      NSURL * url = [NSURL URLWithString: self.getURL];
      dataList =[[NSDictionary alloc] init];
  
      NSURLSessionDataTask * dataTask = [session dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  
          self.json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
  
      }];
      return self.dataList;
      [dataTask resume];
  
  }
  </code></pre>
  
  <p>Is it possible to get the data inside the blocks of <code>NSURLSession</code>? </p>