> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HCHttpCallResponseGetDynamicBytesWritten

> Gets the dynamic response body size and bytes written for progress reporting.

# HCHttpCallResponseGetDynamicBytesWritten

Gets the dynamic response body size and the bytes written so far for an HTTP call. Custom HTTP implementations use these values for download progress reports.

## Syntax

```cpp theme={null}
HRESULT HCHttpCallResponseGetDynamicBytesWritten(
         HCCallHandle call,
         size_t* dynamicBodySize,
         size_t* dynamicBodyBytesWritten
)
```

### Parameters

*call*   \_In\_\
Type: HCCallHandle

The handle of the HTTP call.

*dynamicBodySize*   \_Out\_\
Type: size\_t\*

Receives the dynamic response body size, in bytes. Receives 0 if the title didn't set a dynamic size.

*dynamicBodyBytesWritten*   \_Out\_\
Type: size\_t\*

Receives the total bytes that the title reported as written.

### Return value

Type: HRESULT

Returns `S_OK` on success, or `E_INVALIDARG` if any parameter is `nullptr`.

## Remarks

The title sets the dynamic size with [HCHttpCallResponseSetDynamicSize](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetdynamicsize.md) and reports progress with [HCHttpCallResponseAddDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponseadddynamicbyteswritten.md).

If `dynamicBodySize` is 0, report download progress from the standard response body information instead. If it's greater than 0 and the title registered a download progress callback, pass `dynamicBodyBytesWritten` and `dynamicBodySize` to the callback that [HCHttpCallRequestGetProgressReportFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetprogressreportfunction.md) returns when `isUploadFunction` is `false`.

`dynamicBodyBytesWritten` isn't reset if libHttpClient retries the call, so after a retry it can include bytes from an earlier attempt. For details, see [HCHttpCallResponseAddDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponseadddynamicbyteswritten.md).

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[httpProvider](https://docs.xbox.com/reference/live/httpclient/httpprovider/httpprovider_members.md)\
[HCHttpCallResponseSetDynamicSize](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetdynamicsize.md)\
[HCHttpCallResponseAddDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponseadddynamicbyteswritten.md)


## Related topics

- [HCHttpCallResponseAddDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponseadddynamicbyteswritten.md)
- [HCHttpCallRequestGetDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetdynamicbyteswritten.md)
- [HCHttpCallResponseSetDynamicSize](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetdynamicsize.md)
- [HCHttpCallRequestGetProgressReportFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetprogressreportfunction.md)
- [httpProvider (contents)](https://docs.xbox.com/reference/live/httpclient/httpprovider/httpprovider_members.md)
