> ## 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.

# HCHttpCallRequestGetDynamicBytesWritten

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

# HCHttpCallRequestGetDynamicBytesWritten

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

## Syntax

```cpp theme={null}
HRESULT HCHttpCallRequestGetDynamicBytesWritten(
         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 request 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 [HCHttpCallRequestSetDynamicSize](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetdynamicsize.md) and reports progress with [HCHttpCallRequestAddDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hchttpcallrequestadddynamicbyteswritten.md). Both functions are declared in `httpClient.h`.

If `dynamicBodySize` is 0, report upload progress from the standard request body size instead. If it's greater than 0 and the title registered an upload progress callback, pass `dynamicBodyBytesWritten` and `dynamicBodySize` to the callback returned by [HCHttpCallRequestGetProgressReportFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetprogressreportfunction.md). Progress callbacks are invoked only when one is registered.

## 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)\
[HCHttpCallResponseGetDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponsegetdynamicbyteswritten.md)\
[HCHttpCallRequestGetProgressReportFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetprogressreportfunction.md)


## Related topics

- [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)
- [HCHttpCallResponseGetDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponsegetdynamicbyteswritten.md)
- [HCHttpCallRequestAddDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hchttpcallrequestadddynamicbyteswritten.md)
- [HCHttpCallResponseAddDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallresponseadddynamicbyteswritten.md)
