From b6bf4ccfc3413a2ea50ad23c54b71e9c495e3b04 Mon Sep 17 00:00:00 2001 From: aescribano Date: Thu, 14 Apr 2016 11:57:30 +0100 Subject: [PATCH] Adding a User-Agent header to the request done in FileSystem.ReadFileAsText --- AutoRest/AutoRest.Core/Utilities/FileSystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/AutoRest/AutoRest.Core/Utilities/FileSystem.cs b/AutoRest/AutoRest.Core/Utilities/FileSystem.cs index 91b4f6c18bdd0..231b6521090d3 100644 --- a/AutoRest/AutoRest.Core/Utilities/FileSystem.cs +++ b/AutoRest/AutoRest.Core/Utilities/FileSystem.cs @@ -17,6 +17,7 @@ public string ReadFileAsText(string path) { using (var client = new WebClient()) { + client.Headers.Add("User-Agent: AutoRest"); return client.DownloadString(path); } }