A collection of HTTP headers stored as name value pairs.
[Visual Basic] Overridable Public ReadOnly Property Headers As NameValueCollection [C#] public NameValueCollection Headers {override get;} [C++] public: __property virtual NameValueCollection* get_Headers(); [JScript] public function get Headers() : NameValueCollection;
The Headers collection contains protocol headers associated with a request. Some headers, listed below, are not stored in the Headers collection but are instead either set by the system or set using properties.
Headers set using properties are:
Header | Property |
---|---|
Transfer-Encoding | TransferEncoding |
Content-Type | ContentType |
Content-Length | ContentLength |
Connection | Connection |
Expect | Expect |
Accept | Accept |
Referer | Referer |
User-Agent | UserAgent |
Host | Set by system |
Date | Set by system |
HttpWebRequest Class | HttpWebRequest Members | System.Net Namespace