I have a NSURLConnectionDataTask
created by the shared NSURLSession
via dataTaskWithRequest
. I resume()
it, but the completion handler never gets called. Observations:
- Sending the same request using
NSURLConnection
’ssendSynchronousRequest
works fine. - Trying a plain GET URL for the data task works fine with the same code.
- When I log the state of the data task, I see that bytes are sent, but no bytes are ever received. Both
error
andresponse
arenil
. The state of the task isrunning
.
What am I doing wrong?