Instance Property

countOfBytesSent

The number of bytes that the task has sent to the server in the request body.

Declaration

var countOfBytesSent: Int64 { get }

Discussion

This byte count includes only the length of the request body itself, not the request headers.

To be notified when this value changes, implement the urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:) delegate method.

See Also

Obtaining Task Progress

var progress: Progress

A representation of the overall task progress.

var countOfBytesExpectedToReceive: Int64

The number of bytes that the task expects to receive in the response body.

var countOfBytesReceived: Int64

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

var countOfBytesExpectedToSend: Int64

The number of bytes that the task expects to send in the request body.

let NSURLSessionTransferSizeUnknown: Int64

The total size of the transfer cannot be determined.