Responsible
public protocol Responsible
The type to conform in order to get URLSessionTask updates
-
Received when URLRequest creation has failed
Declaration
Swift
func didFailToCreateURLRequest(with error: Error)Parameters
errorError whihc caused the failure of urlrequest creation
-
Initial response received from request
Declaration
Swift
func didReceiveResponse(dataTask: URLSessionDataTask, response: URLResponse)Parameters
dataTaskUnderlying
URLSessionDataTaskresponsethe raw response from the request
-
Data response received as part of the response. This could be called as many times, the data must be appended to get the complete response data
Declaration
Swift
func didReceiveData(_ data: Data)Parameters
dataThe response data
-
The request completion notified. The request could have either succeeded or failed with error
Declaration
Swift
func didCompleteWithError(dataTask: URLSessionTask, error: Error?)Parameters
taskUnderlying
URLSessionDataTaskerrorerror what caused the request failure