title: NSURLSession in background, posting and receiving response from server?
body: <p>I'm trying to understand how to properly use NSURLSession for my scenario, reading through specification, need more clarification..
  <a href="https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/UsingNSURLSession.html#//apple_ref/doc/uid/TP40013509-SW1" rel="nofollow">https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/UsingNSURLSession.html#//apple_ref/doc/uid/TP40013509-SW1</a></p>
  
  <p>My server API is very simple. I use protobufs for data communication and message payload very small, turnaround very quick. From data standpoint it's just plain binary data being transferred.
  Server supports only POST request and responds with data.</p>
  
  <p>So, it goes like this:
  - POST request with custom headers and binary payload
  - server responds with message and binary payload (response also might include custom headers)</p>
  
  <p>From what I see in documentation data tasks is exactly what I need, but they say </p>
  
  <blockquote>
    <p>Data tasks send and receive data using NSData objects. Data tasks are
    intended for short, often interactive requests from your app to a
    server. Data tasks can return data to your app one piece at a time
    after each piece of data is received, or all at once through a
    completion handler. Because data tasks do not store the data to a
    file, <strong>they are not supported in background sessions</strong></p>
  </blockquote>
  
  <p>So, I left with download and upload tasks and they go into a file. How do I go about achieving what I need? Sounds like I should use upload task, but will I get response data back?</p>