Class CustomHttpHeader
Represents a custom HTTP header sent on device search response or notification messages.
Inheritance
System.Object
CustomHttpHeader
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Rssdp
Assembly: cs.temp.dll.dll
Syntax
public sealed class CustomHttpHeader
Constructors
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. |
Properties
Name
Return the name of this header.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Value
Returns the value of this header.
Declaration
public string Value { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
ToString()
Returns the header formatted for use in an HTTP message.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string representing this header in the format of 'name: value'. |
Overrides
System.Object.ToString()