Class that represents the collection of header fields in a message or body part.
For a list of all members of this type, see Headers Members.
System.Object
Node
Headers
Headers represents the collection of header
fields (often called just headers) in an
entity (either a message or body part), as described in RFC 2822
and RFC 2045.
A Headers object manages a list of Field
objects, which represent the individual header fields.
In the document tree representation of a message, a Headers
object is an intermediate node, having both a parent node and several
child nodes. The parent node is the Entity object
that contains it. The child nodes are the Field objects in the
list it manages. (See the overview section in the reference page for
Node for a discussion of the tree representation
of a message.)
Normally, you do not create a Headers object directly, but
you access it through the Headers property of
Entity, which creates the Headers object for you.
Headers has public methods for adding, removing, or
accessing the Field objects it contains.
Headers also has many convenience methods and properties you
may use to directly access the field bodies of standard header fields.
For example, to access the Content-Type header field, retrieve
the ContentType property. If the
Content-Type header field does not exist, the ContentType
property creates it. To check if a particular header field exists
without creating it, call the HasField() method
with the header field name as an argument. For example, to check if
the Content-Type header field exists, call the method
HasField("Content-Type").
To directly access the field
body of any header field, call FieldBody(). For example, to access the field body of the
X-Foo header field, call FieldBody("X-Foo").
Namespace: Hunny.Mime
Assembly: Hunny.Mime (in Hunny.Mime.dll)
Headers Members | Hunny.Mime Namespace