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

# HCWebSocketGetHeaderAtIndex

> HCWebSocketGetHeaderAtIndex

# HCWebSocketGetHeaderAtIndex

WebSocket 内の 0 から始まる特定のインデックス位置にあるヘッダーを取得します。

## 構文

```cpp theme={null}
HRESULT HCWebSocketGetHeaderAtIndex(  
         HCWebsocketHandle websocket,  
         uint32_t headerIndex,  
         const char** headerName,  
         const char** headerValue  
)  
```

### パラメーター

*websocket*   \_In\_\
型: HCWebsocketHandle

WebSocket のハンドル。

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

ヘッダーの 0 から始まる特定のインデックス。

*headerName*   \_Out\_\
型: char\*\*

HTTP 呼び出し用の UTF-8 でエンコードされたヘッダー名。

*headerValue*   \_Out\_\
型: char\*\*

HTTP 呼び出し用の UTF-8 でエンコードされたヘッダー値。

### 戻り値

型: HRESULT

この API 操作の結果コード。指定可能な値は、S\_OK、E\_INVALIDARG、または E\_FAIL です。

## 解説

HTTP 呼び出しに含まれるヘッダーの数を知るには、HCHttpCallGetNumHeaders() を使用します。

## 要件

**ヘッダー:** httpProvider.h

**ライブラリ:** libHttpClient.GDK.lib

## 関連項目

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


## Related topics

- [HCWebSocketGetHeader](/ja-jp/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheader.md)
- [HCWebSocketGetNumHeaders](/ja-jp/reference/live/httpclient/httpprovider/functions/hcwebsocketgetnumheaders.md)
- [HCWebSocketSetHeader](/ja-jp/reference/live/httpclient/httpclient/functions/hcwebsocketsetheader.md)
- [HCWebSocketCreate](/ja-jp/reference/live/httpclient/httpclient/functions/hcwebsocketcreate.md)
- [HCGetWebSocketFunctions](/ja-jp/reference/live/httpclient/httpprovider/functions/hcgetwebsocketfunctions.md)
