Contents

countOfBytesReceived

The number of bytes that the task has received from the server in the response body.

Declaration

var countOfBytesReceived: Int64 { get }

Discussion

To be notified when this value changes, implement the urlSession(_:dataTask:didReceive:) delegate method (for data and upload tasks) or the urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:) method (for download tasks).

See Also

Obtaining task progress