Is it possible to set/change User Agent string when I do the HttpRequest?
I found no property about this. Is there something, I'm not seeing?
Thanks.
I found no property about this. Is there something, I'm not seeing?
Thanks.
HttpRequest request = await new HttpRequest(new Uri(new Uri("http://localhost:10080/),
new HttpRequestQuota { MaxDownloadSize = 100000, OperationTimeoutMilliseconds = 10000, ResponseTimeoutMilliseconds = 5000 },
AwaitProcessingEnum.All);
HttpRequest request = await new HttpRequest( new HttpRequestConfig
{
Url = new Uri("http://localhost:10080/"),
Quota = new HttpRequestQuota { MaxDownloadSize = 100000, OperationTimeoutMilliseconds = 10000, ResponseTimeoutMilliseconds = 5000 },
Headers = new List<KeyValuePair<string, string>>() { new KeyValuePair<string, string> ("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0") },
AwaitProcessing = AwaitProcessingEnum.All
});
this.engine.AddLimiter("PageRequestLimiter", new QuotaLimiter( new QuotaLimiterConfig { MaxRunningLimited = 20 }));
this.engine.AddLimiter(new QuotaLimiter(new QuotaLimiterConfig { Name = "PageRequestLimiter", MaxRunningLimited = 20 }));