title: how to get return in AFHTTPRequestOperationManager request in afnetworking
body: <p>Hi  i am posting data in using AFHTTPRequestOperationManager class getting the response from server but not able to return data . method  return is executed first then success data is coming i want to get the value in return . </p>
  
  <p>this is my code<br>
  <strong>.h file</strong> </p>
  
  <pre><code>@interface ServerRequest : NSObject
  {
  
  }
  
  -(NSString *) JsonData:(NSString *)newparams actionmethod:(NSString *)action parameters:(NSDictionary *)params;
  </code></pre>
  
  <p><strong>.m</strong></p>
  
  <pre><code>#import "ServerRequest.h"
  #import "AFNetworking.h"
  
  @implementation ServerRequest
  {
  
  
  
  }
  
  -(NSDictionary *) getJsonData:(NSString *)anynewparams 
                   actionmethod:(NSString *)action 
                     parameters:(NSDictionary *)params {
  
      NSMutableDictionary *json = [[NSMutableDictionary alloc] init];
  
      NSString *url = @"http://gjkhdhdyi/ghdgd/Rest/";
      url = [url stringByAppendingString:action];
  
      AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
      AFJSONRequestSerializer *requestSerializer = [AFJSONRequestSerializer serializer];
  
      [requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
      [requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];
  
      manager.requestSerializer = requestSerializer;
      [manager 
      POST:weburl 
      parameters:params
      success:^(AFHTTPRequestOperation *operation, id responseObject) {
  
           NSLog(@"JSON: %@", responseObject);
           json=responseObject;
           // here i am getting data 
  
      }
  
      failure:^(AFHTTPRequestOperation *operation, NSError *error) {
           NSLog(@"Error: %@", error);
  
      }];
  
      return json;    
  }
  </code></pre>
  
  <p>Now i am calling this method in my ViewController class after importing this i called like this </p>
  
  <pre><code>ServerRequest *servercall=[[ServerRequest alloc]init];
  returninfo=[servercall getJsonData:nil actionmethod:@"loginuser?" parameters:inputs]
  // here i want return data.
  </code></pre>
  
  <p>issue is here not getting return here . but in Method i am getting . so how to get json data after success Request , how to do this </p>