Skip to main content

HCHttpCallResponseAddDynamicBytesWritten

Adds to the number of response body bytes written for an HTTP call that has a dynamic-size response body. libHttpClient uses the total for download progress reports.

Syntax

Parameters

call   _In_
Type: HCCallHandle
The handle of the HTTP call. bytesWritten   _In_
Type: uint64_t
The number of bytes written since the last call. libHttpClient adds this value to the running total.

Return value

Type: HRESULT

Remarks

Call HCHttpCallResponseSetDynamicSize before you call this function. The response-side size is the prerequisite; HCHttpCallRequestSetDynamicSize applies only to the request body. If the running total exceeds the dynamic size, libHttpClient caps the total at the dynamic size and writes a warning to the trace log. The running total isn’t reset if libHttpClient retries the call. Bytes that you report while processing a retried response are added to the existing total, so progress can reach the dynamic size before the retried response finishes and then stays at that size. This function doesn’t synchronize updates to the running total. If more than one thread reports bytes for the same call, serialize those calls.

Requirements

Header: httpProvider.h Library: libHttpClient.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

httpProvider
HCHttpCallResponseSetDynamicSize
HCHttpCallResponseGetDynamicBytesWritten
Last modified on October 30, 2026