Skip to content

Replace "Content-Type" with "Accept" when checking nanoclr version #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions source/TestAdapter/NanoCLRHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.ComponentModel;
using System.Net;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Threading;
Expand Down Expand Up @@ -64,7 +63,7 @@ public static bool InstallNanoClr(LogMessenger logger)
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");

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

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

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

if (cliResult.ExitCode == 0)
{
// this will be either (on update):
// this will be either (on update):
// Updated to v1.8.1.102
// or (on same version):
// Already at v1.8.1.102
Expand Down