[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Contains protocol headers associated with a request or response.
Assembly: System.Http (in System.Http.dll)
Thetype exposes the following members.
|Add(String)||Inserts the specified header into the collection.|
|Add(String, String)||Inserts a header with the specified name and value into the collection.|
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|GetValues||Gets an array of header values stored in a header.|
|IsRestricted||Tests whether the specified HTTP header can be set for the request.|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|Remove||Removes the specified header from the collection.|
|Set||Sets the specified header to the specified value.|
|ToByteArray||Infrastructure. Converts the to a byte array..|
|ToString||Infrastructure. This method is obsolete. (Overrides Object..::..ToString()()()().)|
The class is generally accessed through WebRequest..::..Headers or WebResponse..::..Headers. Some common headers are considered restricted and are either exposed directly by the API (such as Content-Type) or protected by the system and cannot be changed.
The restricted headers are: