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

# HCWebSocketGetHeader

> HCWebSocketGetHeader

# HCWebSocketGetHeader

Get a header for the WebSocket.

## Syntax

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

### Parameters

*websocket*   \_In\_\
Type: HCWebsocketHandle

The handle of the WebSocket.

*headerName*   \_In\_z\_\
Type: char\*

UTF-8 encoded header name for the WebSocket.

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

UTF-8 encoded header value for the WebSocket.

### Return value

Type: HRESULT

Result code for this API operation. Possible values are S\_OK, E\_INVALIDARG, E\_OUTOFMEMORY, 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)
- [HCWebSocketGetNumHeaders](/reference/live/httpclient/httpprovider/functions/hcwebsocketgetnumheaders.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)
