Gets or sets a collection of header name/value pairs associated with the request.
| C# | Visual Basic |
public WebHeaderCollection Headers { get; set; }
Public Property Headers As WebHeaderCollection
A WebHeaderCollection containing header name/value pairs associated with this request.
The Headers property contains a WebHeaderCollection instance containing header information that the WebClient sends with the request.
This is an unrestricted collection of headers, so setting headers that are restricted by WebRequest descendants such as HttpWebRequest is allowed.