Client
extension Client
extension Client: DownloadExecuterDelegate
extension Client: UploadExecuterDelegate
-
Call this method at most once, and before calling
download. If you do not call this method and calldownload, the default download executor type is used.Declaration
Swift
public func setupForDownloading(downloadExecutorType: DownloadExecuterType) -
Undocumented
Declaration
Swift
@discardableResult public func download( url: URL, isForced: Bool = false, progressHandler: DownloadHandler.ProgressHandler, _ completion: @escaping DownloadHandler.CompletionHandler ) -> CancellableRequest? -
Declaration
Swift
public func downloadExecuter( _ downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64 ) -
Declaration
Swift
public func downloadExecuter(_ downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) -
Declaration
Swift
public func downloadExecuter(_ downloadTask: URLSessionDownloadTask, didCompleteWithError error: Error?) -
Call this method at most once, and before calling
upload. If you do not call this method and callupload, the default upload executor type is used.Declaration
Swift
public func setupForUploading(uploadExecuterType: UploadExecuterType) -
Undocumented
Declaration
Swift
@discardableResult public func upload( url: URL, fileURL: URL, progressHandler: UploadHandler.ProgressHandler, _ completion: @escaping UploadHandler.CompletionHandler ) -> CancellableRequest? -
Undocumented
Declaration
Swift
@discardableResult public func upload( url: URL, fileURL: URL, multipartType: MultipartType, multipartFileContentType: MultipartContentType, formData: [String: String], progressHandler: UploadHandler.ProgressHandler, _ completion: @escaping UploadHandler.CompletionHandler ) -> CancellableRequest? -
Declaration
Swift
public func uploadExecuter( _ uploadTask: URLSessionUploadTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64 ) -
Declaration
Swift
public func uploadExecuter(didFinishWith uploadTask: URLSessionUploadTask) -
Declaration
Swift
public func uploadExecuter(_ uploadTask: URLSessionUploadTask, didCompleteWithError error: Error?)
View on GitHub
Install in Dash
Client Extension Reference