Tells the delegate that the data task received the initial reply (headers) from the server.
- iOS 7.0+
- macOS 10.9+
- tvOS 9.0+
- watchOS 2.0+
The session containing the data task that received an initial reply.
The data task that received an initial reply.
A URL response object populated with headers.
A completion handler that your code calls to continue the transfer, passing a constant to indicate whether the transfer should continue as a data task or should become a download task.
This method is optional unless you need to support the (relatively obscure)
multipart/x-mixed-replace content type. With that content type, the server sends a series of parts, each of which is intended to replace the previous part. The session calls this method at the beginning of each part, and you should then display, discard, or otherwise process the previous part, as appropriate.
If you do not provide this delegate method, the session always allows the task to continue.