Periodically informs the delegate of the progress of sending body content to the server.
- iOS 7.0+
- macOS 10.9+
- tvOS 9.0+
- watchOS 2.0+
The session containing the data task.
The data task.
The number of bytes sent since the last time this delegate method was called.
The total number of bytes sent so far.
Bytes Expected To Send
The expected length of the body data. The URL loading system can determine the length of the upload data in three ways:
From the length of the
NSDataobject provided as the upload body.
From the length of the file on disk provided as the upload body of an upload task (not a download task).
Content-Lengthin the request object, if you explicitly set it.
Otherwise, the value is
Transfer Size Unknown
-1) if you provided a stream or body data object, or zero (
0) if you did not.