Click or drag to resize

WebClientUserAgent Property

Gets or sets the user agent for requests made by a WebClient.

Namespace:  NScrape
Assembly:  NScrape (in NScrape.dll) Version: 0.4.0.0
Syntax
public string UserAgent { get; set; }

Property Value

Type: String

Implements

IWebClientUserAgent
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