Click or drag to resize

IWebClientUserAgent 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
string UserAgent { get; set; }

Property Value

Type: String
Remarks
If the user agent is not explicitly set, it defaults to a string of the form:
NScrape/[version] (+https://github.com/darrylwhitmore/NScrape)
Examples
var webClient = new WebClient {
    UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
};
See Also