File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -179,18 +179,18 @@ let request = try HTTPClient.Request(
179
179
)
180
180
181
181
let delegate = try FileDownloadDelegate (path : " /tmp/latest-build.yml" , reportProgress : {
182
- if let totalSize = $0 {
183
- print (" Total bytes count: \( totalSize ) " )
182
+ if let totalBytes = $0 .totalBytes {
183
+ print (" Total bytes count: \( totalBytes ) " )
184
184
}
185
- print (" Downloaded \( $1 ) bytes so far" )
185
+ print (" Downloaded \( $0 . receivedBytes ) bytes so far" )
186
186
})
187
187
188
188
client.execute (request : request, delegate : delegate).futureResult
189
- .whenSuccess { finalTotalBytes, downloadedBytes in
190
- if let totalSize = $0 {
191
- print (" Final total bytes count: \( totalSize ) " )
189
+ .whenSuccess { progress in
190
+ if let totalBytes = progress.totalBytes {
191
+ print (" Final total bytes count: \( totalBytes ) " )
192
192
}
193
- print (" Downloaded finished with \( $1 ) bytes downloaded" )
193
+ print (" Downloaded finished with \( progress. receivedBytes ) bytes downloaded" )
194
194
}
195
195
```
196
196
You can’t perform that action at this time.
0 commit comments