title: NSURLConnection delegate methods not getting called
body: <p>I am having a Server Class which has delegate methods of NSURLConnection. And I am having another class named SendRequest which will send the NSMutableURLRequest to the Server Class. 
  In Server Class I am having two methods called </p>
  
  <pre><code>- (void)executeAsync:(NSMutableURLRequest)urlRequest timeOutInterval:(int)timeOut
  {
      _urlConnection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:YES];];
  }
  
  - (void)executeSync:(NSMutableURLRequest)urlRequest
  {
      NSData* respData = [NSURLConnection sendSynchronousRequest:urlRequest                        returningResponse:&amp;response error:&amp;error];
  
  }
  </code></pre>
  
  <p>Everything works fine until here , I am able to call the above executeAsync method from SendRequest class, which is calling the delegate methods.</p>
  
  <p>Now I have added a new method in the SendRequest class which will call the executeRequest method in Server class. </p>
  
  <pre><code>- (void)executeRequest:(NSMutableURLRequest)urlRequest
  {
      _urlConnection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:YES];];
  }
  </code></pre>
  
  <p>This time , I got trapped . executeRequest method is getting called but it is not calling its delegate methods while processing the URL request.  I am struck here for many hours.</p>
  
  <p>Everything seems to be correct , I am sending the urlRequest the same way I used to send before. But I don't know why it is not working. Feel free comment , but please help me. I am really worried</p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>I need to post a request to the server and get a response . If I try with synchronous it is working fine,but it is blocking the main thread. Thats the reason I am going for the asynchronous. Through delegate methods I am trying to get the response data.</p>