title: AFNetworking not returning data synchronously inside a block
body: <p>Can't receive JSON synchronously inside a block using AFNetworking. I checked this <a href="https://stackoverflow.com/a/7970037/1634365%20but%20no%20result">solution</a>. It
  always nil at the end of method.</p>
  
  <p>Here is my method:</p>
  
  <pre><code>- (BOOL)whois:(NSString *)domain withZone: (NSString*) zone
  {        
      __block NSString *resultCode;
  
      NSURL *url = [[NSURL alloc] initWithString:@"myurl"];
      NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
  
      AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {     
          resultCode = [JSON valueForKeyPath:[NSString stringWithFormat:@"%@.%@", domain,zone]];  //checked with NSLog, works well              
      } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
          NSLog(@"Request Failed with Error: %@, %@", error, error.userInfo);
      }];
  
      NSOperationQueue *queue = [[NSOperationQueue alloc] init];
      [queue addOperation: operation];
      [operation waitUntilFinished];
  
      if(resultCode == @"available") //nil here
      {
          return YES;
      }
      return NO; 
  }
  </code></pre>