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

# HCHttpCallResponseSetHeader

> HCHttpCallResponseSetHeader

# HCHttpCallResponseSetHeader

为 HTTP 调用设置响应标头。

## Syntax

```cpp theme={null}
HRESULT HCHttpCallResponseSetHeader(  
         HCCallHandle call,  
         const char* headerName,  
         const char* headerValue  
)  
```

### Parameters

*call*   \_In\_\
Type: HCCallHandle

HTTP 调用的句柄。

*headerName*   \_In\_z\_\
Type: char\*

HTTP 调用的 UTF-8 编码响应标头名称。

*headerValue*   \_In\_z\_\
Type: char\*

HTTP 调用的 UTF-8 编码响应标头值。

### Return value

Type: HRESULT

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

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.GDK.lib

## See also

[httpProvider](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/httpprovider_members.md)


## Related topics

- [httpProvider（内容）](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/httpprovider_members.md)
- [HCHttpCallResponseSetHeaderWithLength](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetheaderwithlength.md)
- [HCHttpCallResponseSetResponseBodyBytes](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetresponsebodybytes.md)
- [HCHttpCallResponseSetResponseBodyWriteFunction](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallresponsesetresponsebodywritefunction.md)
- [HCHttpCallResponseSetStatusCode](https://docs.xbox.com/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetstatuscode.md)
