C-DEngine 5.105

HttpListenerResponse..::..AddHeader Method

Adds an HTTP header with the specified name and value to the headers for the response.

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

Syntax


public void AddHeader(
	string name,
	string value
)
Public Sub AddHeader ( _
	name As String, _
	value As String _
)
public:
void AddHeader(
	String^ name, 
	String^ value
)

Parameters

name
Type: String
A String that represents the name of the header to add.
value
Type: String
A String that represents the value of the header to add.

Exceptions


ExceptionCondition
ArgumentNullExceptionname is nullNothingnullptra null reference (Nothing in Visual Basic) or empty.
ArgumentException

name or value contains invalid characters.

-or-

name is a restricted header name.

ArgumentOutOfRangeException The length of value is greater than 65,535 characters.
InvalidOperationException The header cannot be allowed to add to the current headers.