HttpProgress HttpProgress HttpProgress HttpProgress HttpProgress Struct

Definition

Contains status information on the progress of an HttpClient operation.

public : struct HttpProgress
struct winrt::Windows::Web::Http::HttpProgress
public struct HttpProgress
Public Structure HttpProgress
var httpProgress = {

   bytesReceived: /* Your value */,

   bytesSent: /* Your value */,

   retries: /* Your value */,

   stage: /* Your value */,

   totalBytesToReceive: /* Your value */,

   totalBytesToSend: /* Your value */

}
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

When sending (POST method) an HttpBufferContent class, the value jumps from 0% bytes sent to 100% bytes sent in one progress event, because the whole buffer is moved to lower network APIs all at once. For more detailed progress, use HttpStreamContent instead of HttpBufferContent, because streams are read and sent in smaller chunks, resulting in more progress events. E.g. 0 bytes sent, 65536 bytes sent, 131072 bytes sent, etc.

Fields

BytesReceived BytesReceived BytesReceived BytesReceived BytesReceived

The total number of bytes received.

This value includes bytes received as response headers.

If the operation was restarted, this value may be smaller than in the previous progress report.

ulong BytesReceived;
ulong BytesReceived;
ulong BytesReceived;
BytesReceived As ulong;
var ulong = httpProgress.bytesReceived;
httpProgress.bytesReceived = ulong;

BytesSent BytesSent BytesSent BytesSent BytesSent

The total number of bytes sent.

This value includes bytes sent as request headers.

If the operation was restarted, this value may be smaller than in the previous progress report.

ulong BytesSent;
ulong BytesSent;
ulong BytesSent;
BytesSent As ulong;
var ulong = httpProgress.bytesSent;
httpProgress.bytesSent = ulong;

Retries Retries Retries Retries Retries

The number of retries.

unsigned int Retries;
unsigned int Retries;
uint Retries;
Retries As uint;
var uint = httpProgress.retries;
httpProgress.retries = uint;

Stage Stage Stage Stage Stage

The step in the progress of an HTTP connection.

HttpProgressStage Stage;
HttpProgressStage Stage;
HttpProgressStage Stage;
Stage As HttpProgressStage;
var HttpProgressStage = httpProgress.stage;
httpProgress.stage = HttpProgressStage;

TotalBytesToReceive TotalBytesToReceive TotalBytesToReceive TotalBytesToReceive TotalBytesToReceive

The total number of data bytes to receive.

If the number is unknown, this value is 0.

IReference<ulong> TotalBytesToReceive;
IReference<ulong> TotalBytesToReceive;
IReference<ulong> TotalBytesToReceive;
TotalBytesToReceive As Nullable<ulong>( Of ulong );
var Nullable<ulong> = httpProgress.totalBytesToReceive;
httpProgress.totalBytesToReceive = Nullable<ulong>;

TotalBytesToSend TotalBytesToSend TotalBytesToSend TotalBytesToSend TotalBytesToSend

The total number of data bytes to send.

If the number is unknown, this value is 0.

IReference<ulong> TotalBytesToSend;
IReference<ulong> TotalBytesToSend;
IReference<ulong> TotalBytesToSend;
TotalBytesToSend As Nullable<ulong>( Of ulong );
var Nullable<ulong> = httpProgress.totalBytesToSend;
httpProgress.totalBytesToSend = Nullable<ulong>;