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

# HCMockResponseSetStatusCode

> HCMockResponseSetStatusCode

# HCMockResponseSetStatusCode

Set the HTTP status code to return for the mock.

## Syntax

```cpp theme={null}
HRESULT HCMockResponseSetStatusCode(  
         HCMockCallHandle call,  
         uint32_t statusCode  
)  
```

### Parameters

*call*   \_In\_\
Type: HCMockCallHandle

The handle of the HTTP call.

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

the HTTP status code of the HTTP call response.

### Return value

Type: HRESULT

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

## Requirements

**Header:** mock.h

**Library:** libHttpClient.GDK.lib

## See also

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


## Related topics

- [HCMockResponseSetNetworkErrorCode](/reference/live/httpclient/mock/functions/hcmockresponsesetnetworkerrorcode.md)
- [HCHttpCallResponseSetStatusCode](/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetstatuscode.md)
- [HCMockResponseSetHeader](/reference/live/httpclient/mock/functions/hcmockresponsesetheader.md)
- [HCMockResponseSetResponseBodyBytes](/reference/live/httpclient/mock/functions/hcmockresponsesetresponsebodybytes.md)
- [HCMockAddMock](/reference/live/httpclient/mock/functions/hcmockaddmock.md)
