title: Objective-C: Async/Background POST without using delegate method?
body: <p>I need to make some POST calls to my server, but I need to not block the main thread. As I understand, <code>NSMutableURLRequest</code> and <code>NSURLConnection</code> are not thread safe, so it is best to use the async method of <code>NSURLConnection</code>.</p>
  
  <p>My question about this is, how I can package it up nicely into a method, instead of having to use the delegate method?  I would prefer to do:</p>
  
  <pre><code>NSData *returnedData = [Utility postDataToURL:@"some string of data"];
  </code></pre>
  
  <p>This is how it is easy done with the following method:</p>
  
  <pre><code>[NSURLConnection sendSynchronousRequest:serviceRequest returningResponse:&amp;serviceResponse error:&amp;serviceError];
  </code></pre>
  
  <p>It is so nice keeping everything within one method, then just having my data returned from it!  </p>
  
  <p>Are there any block based methods for this? It becomes an issue when I need to write methods for about 50 different calls and each one needs to use the same delegate method. Am I going about this the wrong way?</p>
  
  <p>This will only need to be for iOS5.</p>