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

# HCHttpCallRequestGetHeaderAtIndex

> HCHttpCallRequestGetHeaderAtIndex

# HCHttpCallRequestGetHeaderAtIndex

取得 HTTP 呼叫中位於特定以零為基底之索引的要求標頭。

## 語法

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

### 參數

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

HTTP 呼叫的控制代碼。

*headerIndex*   \_In\_\
類型：uint32\_t

要求標頭的特定以零為基底索引。

*headerName*   \_Out\_\
類型：char\*\*

HTTP 呼叫的 UTF-8 編碼要求標頭名稱。

*headerValue*   \_Out\_\
類型：char\*\*

HTTP 呼叫的 UTF-8 編碼要求標頭值。

### 傳回值

類型：HRESULT

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

## 備註

使用 HCHttpCallRequestGetNumHeaders() 可得知 HTTP 呼叫中有多少個要求標頭。

## 需求

**標頭：** httpProvider.h

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

## 另請參閱

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


## Related topics

- [XblHttpCallGetHeaderAtIndex](/zh-TW/reference/live/xsapi-c/http_call_c/functions/xblhttpcallgetheaderatindex.md)
- [HCHttpCallResponseGetHeaderAtIndex](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsegetheaderatindex.md)
- [HCHttpCallRequestGetHeader](/zh-TW/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetheader.md)
- [HCHttpCallRequestGetNumHeaders](/zh-TW/reference/live/httpclient/httpprovider/functions/hchttpcallrequestgetnumheaders.md)
- [HCHttpCallRequestSetHeader](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetheader.md)
