First of all there a lot of similar questions but they are all about creating of NSURLSessionDataTask
with completion handler. In my case I have NSURLConnection
with a lot of delegate methods and I need to replace it with NSURLSession
.
According to this link I need delegate method URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:
but I can't understand how to use it because all the examples are about creating a task with a completion handler (just success or failure) with no delegate usage at all.