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

# HCHttpCallRequestGetRequestBodyBytes

> HCHttpCallRequestGetRequestBodyBytes

Gets the request body bytes of the HTTP call.

## Syntax

```cpp theme={null}
HRESULT HCHttpCallRequestGetRequestBodyBytes(  
         HCCallHandle call,  
         const uint8_t** requestBodyBytes,  
         uint32_t* requestBodySize  
)  
```

### Parameters

*call*   \_In\_\
Type: HCCallHandle

The handle of the HTTP call.

*requestBodyBytes*   \_Outptr\_result\_bytebuffer\_maybenull\_(\*requestBodySize)\
Type: const uint8\_t\*\*

Receives a pointer to the request body bytes of the HTTP call. Receives `nullptr` if the request body is empty. libHttpClient owns the buffer.

*requestBodySize*   \_Out\_\
Type: uint32\_t\*

Receives the size of the request body, in bytes.

### Return value

Type: HRESULT

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

## Remarks

If the title set a request body read function, this function doesn't return the body bytes. *requestBodySize* then receives the size that the title passed for the read function, but *requestBodyBytes* doesn't point to the body. Read the body with [HCHttpCallRequestGetRequestBodyReadFunction](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetrequestbodyreadfunction.md) instead.

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


## Related topics

- [httpProvider (contents)](https://docs.xbox.com/reference/live/httpclient/httpprovider/httpprovider_members.md)
- [HCHttpCallRequestSetRequestBodyBytes](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetrequestbodybytes.md)
- [HCHttpCallRequestGetRequestBodyString](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetrequestbodystring.md)
- [XblHttpCallRequestSetRequestBodyBytes](https://docs.xbox.com/reference/live/xsapi-c/http_call_c/functions/xblhttpcallrequestsetrequestbodybytes.md)
- [HCHttpCallRequestGetDynamicBytesWritten](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetdynamicbyteswritten.md)
