ContainerNetworkTask

public final class ContainerNetworkTask : NetworkTask

A task which contains another task which can be updated in fligh. Use this task to compose a chain of requests during the original request. An oAuth Flow would be a good example for this.

Note

Take look at RetryNetworkService to see how to use it in detail.
  • Creates a ContainerNetworkTask instance.

    Declaration

    Swift

    public init()
  • Resumes a task.

    Declaration

    Swift

    public func resume()
  • Cancels the underlying task.

    Declaration

    Swift

    public func cancel()
  • Suspends a task.

    Declaration

    Swift

    public func suspend()
  • The underlying task

    Declaration

    Swift

    public var underlyingTask: NetworkTask?
  • Indicates if the request has been canceled. When composing multiple requests this flag must be respected.

    Declaration

    Swift

    public private(set) var isCanceled: Bool