> ## 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 调用中位于指定从零开始索引处的请求标头。

## Syntax

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

### Parameters

*call*   \_In\_\
Type: HCCallHandle

HTTP 调用的句柄。

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

请求标头的从零开始的具体索引。

*headerName*   \_Out\_\
Type: char\*\*

HTTP 调用的 UTF-8 编码请求标头名称。

*headerValue*   \_Out\_\
Type: char\*\*

HTTP 调用的 UTF-8 编码请求标头值。

### Return value

Type: HRESULT

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

## Remarks

使用 HCHttpCallRequestGetNumHeaders() 可获知该 HTTP 调用中的请求标头数量。

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.GDK.lib

## See also

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