UploadRequest
open class UploadRequest : DataRequest
Specific type of Request that manages an underlying URLSessionUploadTask.
-
The request sent or to be sent to the server.
Declaration
Swift
open override var request: URLRequest? { get } -
The progress of uploading the payload to the server for the upload request.
Declaration
Swift
open var uploadProgress: Progress { get }
-
Sets a closure to be called periodically during the lifecycle of the
UploadRequestas data is sent to the server.After the data is sent to the server, the
progress(queue:closure:)APIs can be used to monitor the progress of data being read from the server.Declaration
Swift
@discardableResult open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> SelfParameters
queueThe dispatch queue to execute the closure on.
closureThe code to be executed periodically as data is sent to the server.
Return Value
The request.
UploadRequest Class Reference