URLTask

public class URLTask : Task

This is the Task object that is used by URLTaskManager. This is the type of the Task object that would be passed in to URLTaskInterceptor.intercept(...) and URLTaskReactor.shouldExecute(...) when using the URLTaskManager.

  • The URLRequest object that was used to make the original request with URLTaskManager.session

    Declaration

    Swift

    public var request: URLRequest
  • It’s the tuple that’s returned by called methods on URLSession

    Declaration

    Swift

    public typealias SuccessValue = (data: Data?, response: URLResponse?, error: Error?)
  • Executes the URLRequest

    Declaration

    Swift

    public func execute(completion: @escaping CompletionCallback)
  • Calls URLSessionTask.cancel

    Declaration

    Swift

    public func didCancel(with _: TaskError)