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

# HCHttpCallResponseSetHeaderWithLength

> HCHttpCallResponseSetHeaderWithLength

# HCHttpCallResponseSetHeaderWithLength

設定 HTTP 呼叫的回應標頭。

## 語法

```cpp theme={null}
HRESULT HCHttpCallResponseSetHeaderWithLength(  
         HCCallHandle call,  
         const char* headerName,  
         size_t nameSize,  
         const char* headerValue,  
         size_t valueSize  
)  
```

### 參數

*call*   \_In\_\
類型：HCCallHandle

HTTP 呼叫的控制代碼。

*headerName*   \_In\_reads\_(nameSize)\
類型：char\*

HTTP 呼叫的 UTF-8 編碼回應標頭名稱。

*nameSize*   \_In\_\
類型：size\_t

標頭名稱字串的長度 (以位元組為單位)。

*headerValue*   \_In\_reads\_(valueSize)\
類型：char\*

HTTP 呼叫的 UTF-8 編碼回應標頭值。

*valueSize*   \_In\_\
類型：size\_t

標頭值字串的長度 (以位元組為單位)。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。可能的值為 S\_OK、E\_INVALIDARG、E\_OUTOFMEMORY 或 E\_FAIL。

## 需求

**標頭：** httpProvider.h

**程式庫：** libHttpClient.GDK.lib

## 另請參閱

[httpProvider](/zh-TW/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCHttpCallResponseSetHeader](/zh-TW/reference/live/httpclient/httpprovider/functions/hchttpcallresponsesetheader.md)
- [HCHttpCallResponseGetHeader](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetheader.md)
- [HCHttpCallResponseGetNumHeaders](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetnumheaders.md)
- [HCHttpCallResponseGetHeaderAtIndex](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetheaderatindex.md)
- [HCHttpCallRequestSetHeader](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetheader.md)
