title: How to get a response from NSURLSessionDownloadTask downloadTaskWithRequest
body: <p>Some background first:
  Application is supposed to grab files from AWS S3 server. In order to do that, first step of that process is to go to local server and get the name of the file and some other information from it. After that step we have a complete <strong>URLMutableRequest</strong>.</p>
  
  <p><strong>NOTE</strong>: I am setting up the NSURLSession as a background session:</p>
  
  <pre><code>- (NSURLSession *)backgroundSession
  {
      static NSURLSession *session = nil;
      static dispatch_once_t onceToken;
      dispatch_once(&amp;onceToken, ^{
          NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration backgroundSessionConfiguration:@"identifier"];
          session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:nil];
      });
      return session;
  }
  </code></pre>
  
  <p>This is the task to download the files from AWS S3 server:</p>
  
  <p>for this task <em>I want to use the delegates to run in background mode.</em></p>
  
  <pre><code>@property (nonatomic, strong) NSURLSessionDownloadTask *downloadTask;
  @property (nonatomic, strong) NSURLSession *defaultSession; 
  
  self.defaultSession = [self backgroundSession];
  self.downloadTask = [self.defaultSession downloadTaskWithRequest:request];
  [self.downloadTask resume];
  </code></pre>
  
  <p><strong>How to I get a RESPONSE form this REQUEST?</strong></p>
  
  <p>Apple documentation says you can't have a block as completionHandler when using a <code>backgroundSessionConfiguration</code>.</p>