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

# HCWebSocketGetNumHeaders

> HCWebSocketGetNumHeaders

# HCWebSocketGetNumHeaders

Gets the number of headers in the WebSocket.

## Syntax

```cpp theme={null}
HRESULT HCWebSocketGetNumHeaders(  
         HCWebsocketHandle websocket,  
         uint32_t* numHeaders  
)  
```

### Parameters

*websocket*   \_In\_\
Type: HCWebsocketHandle

The handle of the WebSocket.

*numHeaders*   \_Out\_\
Type: uint32\_t\*

the number of headers in the WebSocket.

### Return value

Type: HRESULT

Result code for this API operation. Possible values are S\_OK, E\_INVALIDARG, or E\_FAIL.

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.GDK.lib

## See also

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


## Related topics

- [HCWebSocketGetHeaderAtIndex](/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheaderatindex.md)
- [HCWebSocketGetHeader](/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheader.md)
- [HCWebSocketSetHeader](/reference/live/httpclient/httpclient/functions/hcwebsocketsetheader.md)
- [HCGetWebSocketFunctions](/reference/live/httpclient/httpprovider/functions/hcgetwebsocketfunctions.md)
- [HCWebSocketGetProxyUri](/reference/live/httpclient/httpprovider/functions/hcwebsocketgetproxyuri.md)
