Progress.md

February 5, 2018 ยท View on GitHub

Progress

Return progress when download or upload.

Download Progress

HTTPBinNetwork.download(HTTPBinDownLoadRequest(), progressClosure: { (progress) in
    debugPrint(progress.currentProgress) //0~1
    debugPrint(progress.currentProgressString) //0%~100%
}) { (resposne) in
                    
}

Upload Progress

HTTPBinNetwork.upload(uploadRequest, progressClosure: { (progress) in
    debugPrint(progress.currentProgress) //0~1
    debugPrint(progress.currentProgressString) //0%~100%
}) { (response) in
                        
}