mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
provide a user agent when fetching the releases entry
This commit is contained in:
@@ -99,7 +99,10 @@ namespace SyncReleases
|
||||
{
|
||||
Console.WriteLine("Trying to download RELEASES index from {0}", uri);
|
||||
|
||||
var userAgent = new System.Net.Http.Headers.ProductInfoHeaderValue("Squirrel", Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
||||
|
||||
using (HttpClient client = new HttpClient()) {
|
||||
client.DefaultRequestHeaders.UserAgent.Add(userAgent);
|
||||
return await client.GetStringAsync(uri);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user