Skip to content

Commit 1e672e6

Browse files
authored
Replace "Content-Type" with "Accept" when checking nanoclr version (#304)
1 parent 3c2d80d commit 1e672e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

source/TestAdapter/NanoCLRHelper.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.ComponentModel;
6-
using System.Net;
76
using System.Net.Http;
87
using System.Text.RegularExpressions;
98
using System.Threading;
@@ -64,7 +63,7 @@ public static bool InstallNanoClr(LogMessenger logger)
6463
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
6564

6665
// Set any additional headers, if needed.
67-
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
66+
client.DefaultRequestHeaders.Add("Accept", "application/json");
6867

6968
// Set the URL to request.
7069
string url = "https://api.nuget.org/v3-flatcontainer/nanoclr/index.json";
@@ -123,7 +122,7 @@ public static bool InstallNanoClr(LogMessenger logger)
123122

124123
if (cliResult.ExitCode == 0)
125124
{
126-
// this will be either (on update):
125+
// this will be either (on update):
127126
// Tool 'nanoclr' was successfully updated from version '1.0.205' to version '1.0.208'.
128127
// or (update becoming reinstall with same version, if there is no new version):
129128
// Tool 'nanoclr' was reinstalled with the latest stable version (version '1.0.208').
@@ -190,7 +189,7 @@ public static void UpdateNanoCLRInstance(
190189

191190
if (cliResult.ExitCode == 0)
192191
{
193-
// this will be either (on update):
192+
// this will be either (on update):
194193
// Updated to v1.8.1.102
195194
// or (on same version):
196195
// Already at v1.8.1.102

0 commit comments

Comments
 (0)