WebClientUserAgent Property |
Gets or sets the user agent for requests made by a
WebClient.
Namespace:
NScrape
Assembly:
NScrape (in NScrape.dll) Version: 0.4.1.0
Syntax public string UserAgent { get; set; }
Public Property UserAgent As String
Get
Set
public:
virtual property String^ UserAgent {
String^ get () sealed;
void set (String^ value) sealed;
}
abstract UserAgent : string with get, set
override UserAgent : string with get, set
Property Value
Type:
StringImplements
IWebClientUserAgentRemarks
If the user agent is not explicitly set, it defaults to a string of the form:
NScrape/[version] (+https:
Examples var webClient = new WebClient {
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
};
See Also