C-DEngine 5.105

WebHeaderCollection..::..Add Method (HttpRequestHeader, String)

Adds the specified request header with the specified value to the collection.

Namespace:  WebSocketSharp.Net
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public void Add(
	HttpRequestHeader header,
	string value
)
Public Sub Add ( _
	header As HttpRequestHeader, _
	value As String _
)
public:
void Add(
	HttpRequestHeader^ header, 
	String^ value
)

Parameters

header
Type: WebSocketSharp.Net..::..HttpRequestHeader
One of the HttpRequestHeader enum values, represents the request header to add.
value
Type: String
A String that represents the value of the header to add.

Exceptions


ExceptionCondition
ArgumentException

header is a restricted header.

-or-

value contains invalid characters.

ArgumentOutOfRangeException The length of value is greater than 65,535 characters.
InvalidOperationException The current WebHeaderCollection instance doesn't allow the request header.