> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

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

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[httpProvider](https://docs.xbox.com/reference/live/httpclient/httpprovider/httpprovider_members.md)


## Related topics

- [httpProvider (contents)](https://docs.xbox.com/reference/live/httpclient/httpprovider/httpprovider_members.md)
- [HCWebSocketGetNumResponseHeaders](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hcwebsocketgetnumresponseheaders.md)
- [HCWebSocketGetResponseHeader](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hcwebsocketgetresponseheader.md)
- [HCWebSocketGetResponseHeaderAtIndex](https://docs.xbox.com/reference/live/httpclient/httpclient/functions/hcwebsocketgetresponseheaderatindex.md)
- [HCWebSocketGetHeaderAtIndex](https://docs.xbox.com/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheaderatindex.md)
