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

# HCHttpCallResponseSetStatusCode

> HCHttpCallResponseSetStatusCode

# HCHttpCallResponseSetStatusCode

设置 HTTP 调用响应的 HTTP 状态代码。

## Syntax

```cpp theme={null}
HRESULT HCHttpCallResponseSetStatusCode(  
         HCCallHandle call,  
         uint32_t statusCode  
)  
```

### Parameters

*call*   \_In\_\
Type: HCCallHandle

HTTP 调用的句柄。

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

HTTP 调用响应的 HTTP 状态代码。

### Return value

Type: HRESULT

此 API 操作的结果代码。可能的值为 S\_OK、E\_INVALIDARG 或 E\_FAIL。

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.GDK.lib

## See also

[httpProvider](/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCMockResponseSetStatusCode](/zh-CN/reference/live/httpclient/mock/functions/hcmockresponsesetstatuscode.md)
- [HCHttpCallResponseGetStatusCode](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetstatuscode.md)
- [HCHttpCallResponseSetNetworkErrorCode](/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetnetworkerrorcode.md)
- [XblHttpCallGetStatusCode](/zh-CN/reference/live/xsapi-c/http_call_c/functions/xblhttpcallgetstatuscode.md)
- [HCHttpCallResponseGetNetworkErrorCode](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetnetworkerrorcode.md)
