public protocol URLSessionProtocol
This protocol is used to enable creating URLSession mocks
typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
data task convenience methods. These methods create tasks that bypass the normal delegate calls for response and data delivery, and provide a simple cancelable asynchronous interface to receiving data. Errors will be returned in the NSURLErrorDomain, see
. The delegate, if any, will still be called for authentication challenges.