URLSessionBasedNetworkOperationUtilities
public struct URLSessionBasedNetworkOperationUtilities
Undocumented
-
Creates and returns a block that builds a
CallOperationfrom aCall.Requestusing aURLSession.Declaration
Swift
public static func createCallOperationBuilder(with scheme: URLScheme, session: URLSession, delegate: URLSessionEventHub) -> (Call.Request) -> CallOperationParameters
schemeA scheme to use when building the operation.
sessionA session used to create data tasks.
delegateThe session delegate.
Return Value
A block that builds a
URLSessionDataTask-backedCallOperationfrom aCall.Request. -
Creates and returns a block that builds an
UploadOperationfrom anUpload.Requestusing aURLSession.Declaration
Swift
public static func createUploadOperationBuilder(with scheme: URLScheme, session: URLSession, delegate: URLSessionEventHub) -> (Upload.Request) -> UploadOperationParameters
schemeA scheme to use when building the operation.
sessionA session used to create upload tasks.
delegateThe session delegate.
Return Value
A block that builds a
URLSessionUploadTask-backedUploadOperationfrom anUpload.Request. -
Creates and returns a block that builds a
DownloadOperationfrom aDownload.Requestusing aURLSession.Declaration
Swift
public static func createDownloadOperationBuilder(with session: URLSession, delegate: URLSessionEventHub) -> (Download.Request) -> DownloadOperationParameters
sessionA session used to create download tasks.
delegateThe session delegate.
Return Value
A block that builds a
URLSessionDownloadTask-backedDownloadOperationfrom aDownload.Request.
View on GitHub
URLSessionBasedNetworkOperationUtilities Structure Reference