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

Obtient les en-têtes à un index de base zéro spécifique dans le WebSocket.

## Syntaxe

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

### Paramètres

*websocket*   \_In\_\
Type : HCWebsocketHandle

Handle du WebSocket.

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

Index de base zéro spécifique de l'en-tête.

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

Nom de l'en-tête encodé en UTF-8 pour l'appel HTTP.

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

Valeur de l'en-tête encodée en UTF-8 pour l'appel HTTP.

### Valeur de retour

Type : HRESULT

Code de résultat de cette opération d'API. Les valeurs possibles sont S\_OK, E\_INVALIDARG ou E\_FAIL.

## Remarques

Utilisez HCHttpCallGetNumHeaders() pour connaître le nombre d'en-têtes de l'appel HTTP.

## Configuration requise

**En-tête :** httpProvider.h

**Bibliothèque :** libHttpClient.GDK.lib

## Voir aussi

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


## Related topics

- [HCWebSocketGetHeader](/fr/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheader.md)
- [HCWebSocketGetNumHeaders](/fr/reference/live/httpclient/httpprovider/functions/hcwebsocketgetnumheaders.md)
- [Requêtes web HTTP et WebSocket dans le GDK](/fr/build/console-features/networking/web-requests/http-networking.md)
- [HCWebSocketSetHeader](/fr/reference/live/httpclient/httpclient/functions/hcwebsocketsetheader.md)
- [HCWebSocketCreate](/fr/reference/live/httpclient/httpclient/functions/hcwebsocketcreate.md)
