WebSocket SetHeader Method (String)C# API
Sets an HTTP header to use in the opening handshake request for this WebSocket, using the contents of the specified string.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.5.77 (1.0.0.0)
Syntax

public virtual void SetHeader(
	string header
)

Parameters

header
Type: System String
The header to set, including the value, which should be separated from the name with a colon.
Remarks

The header will be sent to the web server when this WebSocket is opened.
Examples

The following example demonstrates setting the "X-Requested-With" header on the request.
webSocket.SetHeader("X-Requested-With: XMLHttpRequest");
See Also