NetworkOperation
open class NetworkOperation : GenericOperation<Response>
Network Operation
-
Task type
Declaration
Swift
public typealias Task = (NetworkOperation, @escaping (Response?, Error?) -> Void) -> Void
-
Task to execute
Declaration
Swift
public let request: URLRequest
-
Url Sesssion
Declaration
Swift
public let session: URLSession
-
Task
Declaration
Swift
public private(set) var task: URLSessionTask? { get }
-
Initializer
Declaration
Swift
public init(request: URLRequest, session: URLSession)
Parameters
task
task to execute
-
Main function
Declaration
Swift
override open func main()
-
Cancel
Declaration
Swift
override open func cancel()