RequestTransferMetrics
public struct RequestTransferMetrics
Used by NetworkingProvider
implementations to report request progress.
-
Bytes of HTTP request body sent.
Declaration
Swift
public var requestBytesSent: Int64
-
Total size of HTTP request body. Negative or nil indicates unknown size. Providers should ensure that
requestBytesSent == requestBytesTotal
when the request is complete, as this allows Siesta to include response latency in its progress calculation.Declaration
Swift
public var requestBytesTotal: Int64?
-
Bytes of HTTP response body received.
Declaration
Swift
public var responseBytesReceived: Int64
-
Total expected size of HTTP response body. Negative or nil indicates unknown size.
Declaration
Swift
public var responseBytesTotal: Int64?
-
Full-width initializer. Useful for custom
NetworkingProvider
implementations.See also
SessionTaskContainer.transferMetrics
if your custom provider uses Foundation’sURLSessionTask
.Declaration
Swift
public init( requestBytesSent: Int64, requestBytesTotal: Int64?, responseBytesReceived: Int64, responseBytesTotal: Int64?)