Constructor CustomHttpHeader
CustomHttpHeader(String, String)
Full constructor.
Declaration
public CustomHttpHeader(string name, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The field name of the header. |
| System.String | value | The value of the header |
Remarks
As per RFC 822 and 2616, the name must contain only printable ASCII characters (33-126) excluding colon (:). The value may contain any ASCII characters except carriage return or line feed.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if the name is null. |
| System.ArgumentException | Thrown if the name is an empty value, or contains an invalid character. Also thrown if the value contains a \r or \n character. |