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

# HCMockResponseSetResponseBodyBytes

> HCMockResponseSetResponseBodyBytes

# HCMockResponseSetResponseBodyBytes

Set the response body string to return for the mock.

## Syntax

```cpp theme={null}
HRESULT HCMockResponseSetResponseBodyBytes(  
         HCMockCallHandle call,  
         const uint8_t* bodyBytes,  
         uint32_t bodySize  
)  
```

### Parameters

*call*   \_In\_\
Type: HCMockCallHandle

The handle of the HTTP call.

*bodyBytes*   \_In\_reads\_bytes\_(bodySize)\
Type: uint8\_t\*

The response body bytes of the HTTP call.

*bodySize*   \_In\_\
Type: uint32\_t

The length in bytes of the body being set.

### Return value

Type: HRESULT

Result code for this API operation. Possible values are S\_OK, E\_INVALIDARG, E\_OUTOFMEMORY, or E\_FAIL.

## Requirements

**Header:** mock.h

**Library:** libHttpClient.GDK.lib

## See also

[mock](/reference/live/httpclient/mock/mock_members)


## Related topics

- [HCHttpCallResponseSetResponseBodyBytes](/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetresponsebodybytes.md)
- [HCHttpCallResponseAppendResponseBodyBytes](/reference/live/httpclient/httpprovider/functions/hchttpcallresponseappendresponsebodybytes.md)
- [HCHttpCallResponseGetResponseBodyBytes](/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetresponsebodybytes.md)
- [HCHttpCallResponseSetResponseBodyWriteFunction](/reference/live/httpclient/httpclient/functions/hchttpcallresponsesetresponsebodywritefunction.md)
- [HCHttpCallResponseGetResponseBodyBytesSize](/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetresponsebodybytessize.md)
